web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to find trade agreement with additional field?

(0) ShareShare
ReportReport
Posted on by 573

I have added a new field in both tables PriceDiscTable and PriceDiscAdmTrans, and suppose that the value is already posted to PriceDiscTable. Now I want to find trade agreement with this new field.

Can anyone give me some ideas, or snippets?

Thanks

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,030 Super User 2025 Season 2 on at

    Hi bernardqin,

    What exactly do you mean with 'suppose that the value is already posted'? Do you mean to ask for help how to create an extension  to copy the value of your new field from one table to the other during posting of the trade agreement journal? Or do you have another question here?

  • bernardqin Profile Picture
    573 on at

    Hi Andre,

    I mean that I want to find price based on original fields (like AccountRelation, ItemRelation, date range), and also my new field.

  • André Arnaud de Calavon Profile Picture
    301,030 Super User 2025 Season 2 on at

    Hi bernardqin,

    Do you want to search in the trade agreements or should there be a change in the logic to retrieve a price on the sales order?

  • bernardqin Profile Picture
    573 on at

    Yes, I want to change the logic to find price.

  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at

    pricing logic is crucial in SCM

    if it's minor change then would be better otherwise would have to extend many places

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi bernardqin,

    If you want to change the trade agreements search you need to change PriceDiscPriceAgreementSearch class : COC method for checkAdditionalQualificationForFindingPriceAgreement or doesQuantityQualifyForFindingPriceAgreement and add check if trade agreement record matches by the new field which should be added to PriceDiscPriceAgreementParameters class as well. Then you need to modify the place where the parameter class is initialized (by reference search) and initialize a new field in this class.

  • bernardqin Profile Picture
    573 on at

    Sorry for delaying reply. Would you please give me some code snippet for reference? Thanks.

  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at

    see if this helps and suggest

    bredetservices.com/.../

  • bernardqin Profile Picture
    573 on at

    Thank for your reply. I want to find agreement with additional criteria, however the code you shared is about how to create agreement journal.

  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at

    as Sergei suggested, use CoC on pricetradeagreement classes and introduce your new field

    need to also give the same in activate trade prices

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans