/
Get Data of Previous Quote Revision
Get Data of Previous Quote Revision
Sometimes it can be handy (i.e. in workflow) to get the data of the previous revision of the quote to do comparison to the current quote. As getting the itemLines can be a bit tricky, here is an example:
//we find previous revision of the quote if any def prevRevUniqueName = quote.prevRev if (prevRevUniqueName == null) { return // no previous revision found } //get the previous revision of the quote def prevQuote = api.find("Q", Filter.equal("uniqueName", prevRevUniqueName)) if (!prevQuote) { return // could not get previous revision } //get the itemLines of the previous quote def prevLineItemsCollection = api.getCalculableLineItemCollection(prevQuote[0].typedId) def prevLineItems = prevLineItemsCollection?.lineItems
Line items have the same LineId between revisions (unless they were removed in the new revision). This is important to know if you want to compare the line items between the versions.
, multiple selections available,
Related content
Inputs Behavior in Quote Revisions
Inputs Behavior in Quote Revisions
More like this
How to Configure Change History for Agreements & Promotions or Quotes
How to Configure Change History for Agreements & Promotions or Quotes
More like this
Stop the Submit Process
Stop the Submit Process
Read with this
How to Identify Whether Quote Is Duplicated, Revised or New
How to Identify Whether Quote Is Duplicated, Revised or New
More like this
Read Input Value on Header Level
Read Input Value on Header Level
Read with this
How do I get inputs/outputs of quote line items?
How do I get inputs/outputs of quote line items?
More like this
Found an issue in documentation? Write to us.