function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
App DevelopmentApp Development 

product2id not working for upsert in salesforce integration

As i tried with Upserting the Product2id in salesforce integration but its giving error field is read only. for upsert.

It works well for insert but not for upsert.

Do you any workaround for the same.?
Rakesh51Rakesh51
This is little tricky .. when you are doing upsert, and trying to update the Price then only pass the existing ID( PriceBookEntry.Id) not the Product2Id/PriceBook2Id, then only it will work. Product2Id/PriceBook2Id needed only for Insert.