Is that possible to create a field in Opportunity with number of Opportunity Contact Roles using trigger or declarative tools?
2 Answers
As we can not write trigger or create processes on OpportunityContactRoles, their is no direct way of doing it.
Best way is you write a batch process which runs every day or every hour which will count all opportunityContactroles for given opportunity and update it on respective field of opportunity.
There is an idea which is in Product Team review stage for the same.
-
-
@EugeneVabishchevich Yep, Not provides real time track of the data, but in given circumstances what else can we do. I am all ears for any out of the box solution here.– Mr.FrodoCommented Apr 26, 2018 at 6:16
-
does inserting of opportunity contact role fire some background opportunity update? If yes we can do a trigger. Commented Apr 26, 2018 at 6:19
-
From Salesforce Spring '20 Release Opportunity Contact Roles can be used in Process Builder, Flow Builder, and workflow rules.