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
BenjaminBBenjaminB 

VWF add Contact Roles

Hi guys,

 

I'm looking for a way to lookup a user and then add that user as the primary contact for a contract. Right now I have the user pick the contact from a picklist and then I store the contact in a custom field. The problem is that I need that user to be placed in the Contact Roles object. Does anyone know how to do that?  Is it at all possible with Visual Flows?

 

Thanks for your help!

Best Answer chosen by Admin (Salesforce Developers) 
RajaramRajaram
I believe the Contact Role is now exposed in the API (Case, Account, Opty contact role), so you should be able to using Visual Workflow. Just launch VWF, pass in the ID of the user from the custom field and visual workflow should be able to create it.

All Answers

RajaramRajaram
I believe the Contact Role is now exposed in the API (Case, Account, Opty contact role), so you should be able to using Visual Workflow. Just launch VWF, pass in the ID of the user from the custom field and visual workflow should be able to create it.
This was selected as the best answer
BenjaminBBenjaminB

Ah yes, you are correct.

The trick is that you have to use a record create in which you create an object "ContractContactRole".

 

Thanks!

RajaramRajaram
Yes.. that is because the table is names as such in the API. Think of Flow to be a client of the API. So the object definitions in FLow would be whatever it appears as in the API.