D365 F&O: Filter Trade Agreement Discount by Custom Demo Machine Toggle During Initial Item Selection

Kumar T R 0 Reputation points
2026-09-15T05:34:58.4333333+00:00

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.

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs

0 comments No comments

1 answer

Sort by: Most helpful
  1. Jade Ng 15,490 Reputation points Microsoft External Staff Moderator
    2026-09-15T06:08:26.4+00:00

    Dear Kumar T R,

    Your question involves customizations to the Dynamics 365 Finance & Operations trade agreement framework, including extension points used during the initial discount calculation on PurchLine item selection. This falls within the scope of the Dynamics 365 Finance & Operations product support team, who have access to the appropriate product debugging and development resources

    As a forum moderator I can only provide general guidance, and not able to investigate Dynamics-related service behavior, data issues, or environment-specific problems.

    Detailed cost estimation, migration planning, and licensing or billing guidance for Dynamics 365 depends on the specific needs and configuration of each organization. For this type of tailored assistance, the Dynamics Support team is better positioned to provide recommendations based on your situation.

    Please open the Find Answers | Microsoft Dynamics 365 Community and pick the support option that works best for you.

    User's image

    Your understanding and co-operation are highly appreciated. Please feel free to reply below if you have any update or further concern.

    Looking forward to your response!

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.