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.
Once the condition satisfies, it launches a visual flow as shown below:
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:
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!