Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Question

When you have a quote Quote and add a new line item, either via a button in the user interface or via a quote Quote header calculation logic, the quote 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?

...

hiddentrue

...

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:

  1. To evaluate the inputs needed on the line.

  2. To evaluate all the results.