3

I'm trying to build a flow (using Visual Workflow) to achieve the following:

  1. Cycle through Contracts object and find Contracts based on specific filters
  2. Create Leads from the information captured from those Contracts
  3. Update the a lookup field in the Contracts with the associated Lead Id

Flow currently looks like this:

Current Flow

My current issue is that the flow is trying to create 'Contracts' rather than 'Leads' since the sObject variable used to store the Contract information is linked to Contracts. Is there a way to loop the sObject variable into a Lead related sObject variable so I can use this for the 'Fast Create' element? Any advice to assist with this Flow would be greatly appreciated.

2 Answers 2

0

Could you create flow variables of primitively types - text, currency, percent, etc for the contract values you want to assign to the lead?

Then create a lead SObject, and assign its values from the individual primitive variables.

1
  • Thanks Bruce. Salesforce have provided a potential solution to my issue, but i'll give yours a shot if it doesn't work
    – user8622
    Commented Jun 7, 2016 at 0:27
0

SF provided answer:

https://salesforcesidekick.com/2015/08/24/how-to-use-a-fast-create/

You need to have two assignments in between where firstly you create a Lead type SObject Variable and assign the contract field to fields of this variable and in second assignment assign this Sobject variable to a SObject collection variable for Leads and Fast Create that one.

I have tested the below and it works correctly :)

enter image description here

You must log in to answer this question.

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