Hi Team,I have added a Demo Machine toggle in both PurchLine and the trade agreement lines (PriceDiscAdmTrans / PriceDiscTable).
For example, I have two trade agreement records for the same item:
Demo Machine = Yes → Discount/value = 10,000
Demo Machine = No → Discount/value = 200
My requirement is that when I initially select the Item ID in PurchLine, the system should fetch and apply only the trade agreement where Demo Machine = No. It should not calculate or combine the values from both records.
I have already added logic in PurchLine.modifiedField() to handle the Demo Machine toggle. That logic works when I change the toggle manually, but during the initial Item ID selection, the system is still calculating both trade agreement values.
Could you please guide me on the correct extension point or method where I can add a filter for DemoMachine = No during the initial item selection and trade agreement discount calculation?
I want to ensure that only the standard discount for Demo Machine = No is fetched initially, while the Demo Machine = Yes discount is applied only when explicitly selected.

Report
All responses (
Answers (