Why is a Quote line logic called twice when I add a new line?
Question
When you have a Quote and add a new line item, either via a button in the user interface or via a Quote header calculation logic, the Quote line logic is executed twice. The first time with api.currentItem()
returning null and the second time with api.currentItem()
returning the whole line. Why is that so?
Answer
The reason is that the system needs to evaluate the inputs created for the line. So the system calls the Quote line logic twice:
To evaluate the inputs needed on the line.
To evaluate all the results.
, multiple selections available,
Related content
Process of Adding New Item to a Quote
Process of Adding New Item to a Quote
Read with this
Process of Quote Recalculation
Process of Quote Recalculation
Read with this
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
Inputs Behavior in Quote Revisions
Inputs Behavior in Quote Revisions
More like 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
How do I get inputs/outputs of quote line items?
How do I get inputs/outputs of quote line items?
Read with this
Found an issue in documentation? Write to us.