How do I get inputs/outputs of quote line items?
Question
I am trying to get Quote line item details using api.find("QLI")
in a Calculation Flow logic but I am getting a simple Quote object such as:
{version=0, typedId=47574.QLI, dirty=false, lineId=dQO02lmsmWA8ZZO, calculationStatus=10, editabilityStatus=0, label=2M CLEAR BOPP/FA20B/40#, sku=CLSCLS.COMMON10576, folder=false, treeLabel=2M CLEAR BOPP/FA20B/40#, createDate=2016-12-20T19:54:15, lastUpdateDate=2016-12-20T19:54:18, id=47574}
Is there any other way to get inputs/outputs of the line items in CF?
Answer
api.getCalculableLineItemCollection(String typedId)
+ getCalculableLineItem(Object clic, String lineId)
CalculableLineItemCollection
= Quote (can also be Agreement/Promotion or Rebate Agreement)
Inputs/outputs are lazy-loaded, therefore the above mentioned function exists, I think.
Another way would be to reference the object(s) which may be subject to Lazy Loading directly in the api.find/api.stream
quoteLineRecords = api.stream("QLI", null, ["outputs.TotalInvoicePrice.result"], Filter.equal("clicId",thisQuote.id)).withCloseable {
it.collect()
}
, multiple selections available,
Related content
How to pass results calculated in the quote header logic to the line items?
How to pass results calculated in the quote header logic to the line items?
More like this
Quote Line Item (QLI)
Quote Line Item (QLI)
Read with this
How to Handle Passing Values within Quote's Header Logics, Configurators and Line Item Logic
How to Handle Passing Values within Quote's Header Logics, Configurators and Line Item Logic
More like this
Working with QuoteStructure
Working with QuoteStructure
More like this
Get Data of Previous Quote Revision
Get Data of Previous Quote Revision
More like this
Configure a Quote
Configure a Quote
Read with this
Found an issue in documentation? Write to us.