Notifications
Announcements
No record found.
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
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?
Hi Andre,
I mean that I want to find price based on original fields (like AccountRelation, ItemRelation, date range), and also my new field.
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?
Yes, I want to change the logic to find price.
pricing logic is crucial in SCM
if it's minor change then would be better otherwise would have to extend many places
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.
Sorry for delaying reply. Would you please give me some code snippet for reference? Thanks.
see if this helps and suggest
bredetservices.com/.../
Thank for your reply. I want to find agreement with additional criteria, however the code you shared is about how to create agreement journal.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 611 Most Valuable Professional
André Arnaud de Cal... 529 Super User 2025 Season 2
Sohaib Cheema 285 User Group Leader