0

Is that possible to create a field in Opportunity with number of Opportunity Contact Roles using trigger or declarative tools?

2 Answers 2

1

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.

4
  • no the best solution to be honest :) Commented Apr 26, 2018 at 5:59
  • @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.Frodo
    Commented 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
  • @EugeneVabishchevich No, not in my knowledge.
    – Mr.Frodo
    Commented Apr 26, 2018 at 7:02
1

From Salesforce Spring '20 Release Opportunity Contact Roles can be used in Process Builder, Flow Builder, and workflow rules.

https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_sales_features_core_contacts_automate_oppty_contact_roles.htm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .