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() }

Found an issue in documentation? Write to us.

Â