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
jutamindjutamind 

Set opportunity pricebook based on primary partner

Hi,

 

I've installed Account Pricebook apps in my SFDC org which link an account with a default pricebook. For those opportunities that i sell to end users via dealers, I would like to create opportunity record with the end user as the opportunity account and i will insert the dealer into the Partner related list of the opportunity record.

 

What i would like to achieve is to automatically set the opportunity pricebook the moment a dealer is set as the primary dealer in the Partner related list. This auto set pricebook should be the default pricebook set at the dealer account record.

 

Can this be done? If yes, how?