You need to sign in to do that
Don't have an account?
Copy QuoteLineItems, then delete original QuoteLineItems - Flow
This should be easy, but I've got the Salesforce Admin version of writers block.
I am looking to create a headless flow that takes my QuoteLineItems from a Quote and creates new QuoteLineItems in the exact same SortOrder on the exact same quote. Then I want it to delete the original set of QuoteLineItems.
I am looking to create a headless flow that takes my QuoteLineItems from a Quote and creates new QuoteLineItems in the exact same SortOrder on the exact same quote. Then I want it to delete the original set of QuoteLineItems.
In case anyone needs to know how I ended up building this.
- Fast Lookup of QuoteLineItems matching on QuoteId. Sort results by Sort Order Ascending. Store results in a SObject Collection Variable.
- Loop through the Collection, loop variable is SObject Variable set for QuoteLineItems.
- Assignment. SObject Variable for New QuoteLineItems. Fields are set equal to the corresponding field from QuoteLineItem SObject Variable.
- Assignment. NewQuoteLineItems are added to a new SObject Collection Variable (records to create). Flow back to loop.
- Fast Delete. Original SObject Collection of Quote Line Items.
- Fast Create. Second SObject Collection on New Quote Line Items.
I have noticed however that though it creates the new set of line items in order based upon the original Sort Order, the Sort Order for the new items is not the same.