api.getCalculableLineItem()

The method api.getCalculableLineItem() has been deprecated in 14.0 version.

Deprecated Usage

Groovy
def quoteId = 1168

api.find("QLI", Filter.equal("clicId", quoteId)).collect {
    def item = api.getCalculableLineItem(quoteId + ".Q", it.lineId)
    def qty = item?.inputs?.find { it.name == "Quantity" }?.result
    def price = item?.outputs?.find { it.resultName == "Price" }?.result
}

QueryApi Usage

This particular QueryApi usage requires the hibernate compression to be turned off by setting propertyjsonBlobCompressionThreshold = -1 on the cluster. This action can be performed only by support team.

Groovy
def quote = "P-1168"

def qapi = api.queryApi()
def t1 = qapi.tables().quoteLineItems(quote)

qapi.source(t1, [
        t1.input("Quantity").value().as("Qty"),
        t1.output("Price").result().as("Price"),
])
        .stream {
            it.each { line ->
                def qty = line.Qty
                def price = line.Price
            }
        }

See Also