0

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:

flow overview

1. Set screen flow to allow user to choose to clone related QLIs

enter image description here

2. Assign variables

enter image description here

3. Clone the Quote with all record values

enter image description here

4. Assign new Quote ID to new variable

enter image description here

5. Update some fields on the new Quote record so name and status are more accurate - Here setNewQuoteName variable is just random text

enter image description here

6. When 'Yes, Clone' is chosen on the screen flow, grab all related QLI records

enter image description here

7. Loop through each related QLI record that was collected

enter image description here

8. Update the values in each related record grabbed

enter image description here

9. Add each related record to a collection

enter image description here

enter image description here

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.

enter image description here

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.

enter image description here

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.

enter image description here

enter image description here

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:

enter image description here

enter image description here

As you can see, it appears to be an issue with variable access. How can this be fixed?

7
  • 1
    Can you confirm how you are getting the Record id in this screen flow. Commented Jan 19, 2022 at 3:35
  • @SaiPraveenKakkirala - Yes - I created a variable with data type 'Record' and Object 'Quote', and set the variable name to recordID. Availability Outside the Flow was set to 'Available for input'. Then, as you can see in the image under '2. Assign variables', I assign recordID > QuoteID to variable Original_Quote_ID. Commented Jan 19, 2022 at 13:05
  • 1
    recordId is case sensitive. Can you try as recordId as variable Commented Jan 19, 2022 at 13:16
  • @SaiPraveenKakkirala - I apologize for the mistype above - In the flow, we're directly referencing the variables and values, so case does not seem to be the issue here. This should be visible in the screenshots above. Commented Jan 19, 2022 at 13:21
  • @SaiPraveenKakkirala - Ah, I see what you mean. I've updated the previously 'recordID' variable to 'recordId', and I am still getting the same result. It seems like we're still not getting the Id when the button triggers the flow from the record. Commented Jan 19, 2022 at 13:53

1 Answer 1

1

As mentioned above recordId is case sensitive. Can you try as recordId as variable

1
  • Yes - This was exactly the issue - Thanks for the help and for submitting as an answer! Commented Jan 19, 2022 at 14:41

You must log in to answer this question.

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