Announcements
No record found.
1. I have created One customized Field (InventTable.LTVendName) in InventTable For Displaying Vendor name .
I need to Add logic in the EcoResProductDetailsExtended Form , when Primary vendor is selected (InventTable.PrimariVendorId) , Vendor name (InventTable.LTVendName) should get updated automatically.
Please give me code for this .
You can use modifiedField method
axvinaytak.blogspot.com/.../75-coc-create-coc-of-table-modified.html
if you want it to work like this only on the relevant form. You can write to form datasource/datafield/modified
d365solution.blogspot.com/.../coc-on-form-datasource-field-in-d365.html
Dear Ergun,
Thanks for quick response.
i tried given link earlier , but no luck ,
Please give me exact code
[ExtensionOf(formdatafieldstr(EcoResProductDetailsExtended, InventTable, PrimaryVendorId))] final class LTEcoResProductDetailsExtended_InventTable_PrimaryVendorId_Extension { public boolean validate() { boolean ret; InventTable inventTable ; VendTable vendTable; Info("Enter"); ret = next validate(); ttsbegin; select forupdate inventTable; { inventTable.LTVendName = vendTable::find(inventTable.primaryVendorId).name(); inventTable.update(); } ttscommit ; Info("End"); return ret; } }
I have used above code.
Info Start & End is displaying only , & Nothing happens .
Please correct this code , if anything wrong..
not validate but modified (and you dont need table.update)
I couldn't find a good example after a quick look. For this reason, I shared a similar method. Of course, there are minor differences with the example I shared.
If you fail, you can copy the event handler example I shared below.
community.dynamics.com/.../d365-ax7-form-data-source-field-level-event-handler-methods-onmodified
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 658
André Arnaud de Cal... 468 Super User 2026 Season 1
Syed Haris Shah 333 Super User 2026 Season 1