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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

I need to Add logic in the EcoResProductdetailsExtended form, when Primary vendor is selected (InventTable.PrimariVendorId) , Vendor name (InventTable.LTVendName) should get updated automatically.

(0) ShareShare
ReportReport
Posted on by 115

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 .

I have the same question (0)
  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    You can use modifiedField method

    axvinaytak.blogspot.com/.../75-coc-create-coc-of-table-modified.html

  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    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

  • PK mishra Profile Picture
    115 on at

    Dear Ergun,

    Thanks for quick response.

    i tried given link earlier , but no luck ,

    Please give me exact code

  • PK mishra Profile Picture
    115 on at

    [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;
        }
    
    }

    Dear Ergun,

    I have used above code.

    Info Start & End is displaying only , & Nothing happens .

    Please correct this code , if anything wrong..

  • ergun sahin Profile Picture
    8,826 Moderator on at

    not validate but modified (and you dont need table.update)

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 658

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 468 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 333 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans