Problem statement: Need to populate a custom field on Opportunity object with details from Opportunity contact role object.

Is there a way to achieve this problem with out writing apex?

I found this solution online http://judisohn.com/2015/04/06/using-salesforce-process-builder-flow-with-opportunity-contact-roles/

I followed the same steps as mentioned in this article for use case 2 but it is not working.

Note: Usually in these situations, we write a trigger on the Opportunity Contact role object but Process builder doesn't see Opportunity Contact Role object so the author in the above posted link set up the process on Opportunity object so did I.

Here are process builder details:

Created a Process on Opportunity Object that will fire when a opportunity record is created or edited.

I have a custom field on Opportunity object called 'Primary_Contact__c' and the criteria for process to fire is in the below image.

enter image description here

Once the condition satisfies, it launches a visual flow as shown below:

enter image description here

The process will start the visual flow and sets a opportunity ID value to a variable and visualflow will take that value and search in Opportunity contact role table and then take the contact name and update the opportunity object.

Here are screenshots of how my visual flow is created:

Look up the contact details on Opportunity Contact role table with Opportunity ID passed from Process builder. enter image description here

Once the Record is found take the contact name and update the opportunity object. enter image description here

I know that this whole thing works only if there is any update to the opportunity object. so I created an opportunity and then added opportunity contact role and then updated some irrelevant field on the opportunity object expecting Process builder to fire and do its job but looks it is not working.

I searched through debug logs but looks like we cannot get any details from Visual flow in bebug logs.

Hope I did not confuse anyone :)

Any help on this is greatly appreciated. Thanks!

| improve this question | | | | |
  • 2
    update this question with your lightning process so that we can see the issue. – Himanshu Dec 10 '15 at 19:22
  • @Himanshu, Updated the question with the details. Thanks! – javanoob Dec 10 '15 at 19:37
  • Your criterion is called "Primary Contact is not blank", but then you check ISNULL...shouldn't it be NOT(ISNULL(...))? – Adrian Larson Dec 10 '15 at 19:40
  • @AdrianLarson You caught me there :). The process name should be primary contact role is blank. I will re-upload the image with correct name just to avoid confusion for everybody. Thanks – javanoob Dec 10 '15 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.