How do I find a specific value in a line item?
Question
I am looking for the following value: a specific Rebate Agreement – Line Item – Sales Targets. In the current agreement, I want to search for other agreement, find the related line item (only 1 line item is added) and find the user input „Sales Targets” in this line item. I already know the Rebate Agreement number where I want to search for the Sales Targets, but how to get to the Sales Target?
Answer
Find the typedId of the 'other' agreement (RBA.id), then use Object getCalculableLineItemCollection(String typedId)
from the SandboxAPI.
This will give you a map representing the whole agreement. So you'll need to traverse ra.lineItems[0].inputs
.
Found an issue in documentation? Write to us.