I've created a flow to clone Quote and related Quote Line Items (using this as a loose guide).
I'm working in a sandbox environment. When I run 'Debug' in the Flow builder, the flow executes as intended, and a clone is created from the chosen Quote record with related QLIs attached.
My flow is as follows:
1. Set screen flow to allow user to choose to clone related QLIs
2. Assign variables
3. Clone the Quote with all record values
4. Assign new Quote ID to new variable
5. Update some fields on the new Quote record so name and status are more accurate - Here setNewQuoteName variable is just random text
6. When 'Yes, Clone' is chosen on the screen flow, grab all related QLI records
7. Loop through each related QLI record that was collected
8. Update the values in each related record grabbed
9. Add each related record to a collection
10. After the last collected QLI has been looped over, create new QLIs related to the newly created quote, using the info stored in the record collection from step #9.
11. Decision - If Use_Variable_for_Cloned_Quote_ID is null or an empty string, return a message that lists values of all variables. Otherwise, return success message with link to new Quote.
- From the 'Debug' in the flow itself, you can see all variables are being correctly stored and accessed.
The success message even returns the correct url to the newly created quote, and the sandbox environ will show the newly created quote with all related QLIs accurately.
However, running the flow from the action button within the same record used in 'Debug' above, I hit the created error, and the quote and related qlis do not clone:
As you can see, it appears to be an issue with variable access. How can this be fixed?