[SalesForce] Salesforce Flow: Create record from sObject variable of another object type

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.

Best Answer

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.

Related Topic