Skip to main content
I am trying to use a visual workflow to clone an opportunity with it's child records.  The child records are from a custom object called Quote Options.  This is a master-detail relationship. I have had no trouble cloning the quote or 1 child record but some opportunities have multiple quote options.  I changed my flow to do a fast lookup on quote options, assign the variables, then fast create the new quote options which works. However it is applying the cloned quote options on the original opportunity and not the new cloned opportunity. I can not seem to figure out how to assign the new Opportunity ID to the newly cloned quote options.  Any help would be greatly appreciated.  ThanksDeep Cloning Using Flow Question
3 respuestas
  1. 23 nov 2015, 19:52
    Van,

     

    I've run into Visual Workflow issues like this in the past as well.  Here is one approach to overcome.  Create an SObject Collection variable to hold your new inserts.  Loop through the list of Fast Lookups and insert each one into yiour new SObject variable while assigning the Opportunity Id with the new id.  Then fast create the new records using the SObject Collection variable.

     

    If you have multiple child records.  I suggest creating multiple Visual Workflows, with each doing the cloning for one object.  The main flow can call all the sub flows and will be easier to maintain later on.

     

    Good Luck!

     

    John
0/9000