6

I am creating a workflow inside the Process Builder which will Mirror a record from my Service Order into Opportunities, when the Opportunity is created the record ID needs to be updated into the Service Order record.

How can I do this inside process builder? When selecting a value/lookup for my Opportunity__c foreign key inside Service Order, the Opportunity Inserted ID isn't available.

enter image description here enter image description here

  • whats the relationship between service order and opportunity ? – Mohith Shrivastava Feb 16 '15 at 16:54
  • Service Order has a lookup field labelled Opportunity__c which links to the Opportunity record – Deployment Failure Feb 16 '15 at 16:57
  • If you have Trigger Ready flows enabled ,you can do this else I dont see anyway you could do by complete config .Why do you need lookup on service order ,instead you can have lookup of service order on opportunity if its just one to one relationship – Mohith Shrivastava Feb 16 '15 at 17:10
  • This is how the schema was previously designed so I'm just working on top of it, if it was up to me I would have placed the Serice Order ID in Opportunity. – Deployment Failure Feb 17 '15 at 9:37
2

You can't do this with process builder alone, but you could accomplish the same thing using process builder to launch a flow. Use the process to launch a flow, passing in the new service order record as a variable.

In the flow, create the opportunity record, and in the "Fast Create" element, you can store the opportunity record as an sObject variable. That allows you to access the Opportunity Id in another step later in your flow that updates the Service Order record.

Make sure your criteria in your process is sound to avoid a continuous loop. You'll want to makes sure that the update of the Opportunity Id back to the Service Order record doesn't trigger your process again.

enter image description here

enter image description here

1

If you don't see option to select flow variable(s) in the process builder:

  1. Make sure the type of variable is set to "Input Only" or "Input and Output Only"
  2. Restart the process builder; it will not pick updates from re-saved flow.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.