1

I am attempting to create an automation that populates opportunity contact roles when contacts are selected by the user creating the opportunity.

Upon pushing the flow live, I am getting the following error:

An error occurred at element Create_Contact_Role_for_Ecommerce (FlowRecordCreate). INSERT --- INSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Required fields are missing: [OpportunityId, ContactId]

what do I need to add the Variable Fields so they are no longer missing?

enter image description here

enter image description here

6
  • Do you have any values assigned to OpportunityId and EcommerceContactId variables?
    – o-lexi
    Jan 10, 2017 at 19:12
  • Ah, that is what is missing. I want it to pull the contact in? Do I use Contact email for that and Opportunity ID? It doesn't look like generic Contact is an option.
    – Anne
    Jan 10, 2017 at 22:16
  • What do you mean by "pulling contact in"? You said that you have users to select contact - you just use the selected contact record Id
    – o-lexi
    Jan 10, 2017 at 22:26
  • My end goal is for users to select a contact and that contact to sync as the opportunity contact role using this flow & a corresponding process.
    – Anne
    Jan 10, 2017 at 22:29
  • is this a flow interview with user input? or is it started as a result of a standard or VF page SAVE on Opportunity via Process Builder? If latter, your flow will need to query for the Opportunity.ECommerceContactId if flow receives only Opportunity.Id as argument
    – cropredy
    Jan 10, 2017 at 23:07

1 Answer 1

0

You can create SObject variable like ContactObj and assign that value as default to the EcommerceContactId variable.

Flow variable assignment

And before creating Opportunity Contact Role you should make sure the values of Opportunity Id and Contact Id must be available

You must log in to answer this question.

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