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 :
Microsoft Dynamics AX (Archived)

In the form ,based on the input given how to set the value of other field automatically from the table

(0) ShareShare
ReportReport
Posted on by

hi..

when i enter the id in the form..

the corresponding name for the id need to filled up in the form ..which is already present in the table..

how to do this..

example

table -fields id ,name

form-design-stringedit(id),stringedit(name) 

 here when i enter the id ..the corresponding name need to be set in the form ..using the table ..

*This post is locked for comments

I have the same question (0)
  • Abbas Ithayathullah Profile Picture
    175 on at

    Hi Kasthu,

    Version: Ax 2012

    FormDatasource -> fieldId -> method -> override modified method

    write your logic.

    Br Abbas

  • Community Member Profile Picture
    on at

    hi abbas..

    i write the code to get the name for the id..

    public boolean modified()

    {

       boolean ret;

       PKCCustTable cust;

        ret = super();

          select PKCCustName from cust where cust.PKCMobileNum == this.valueStr();

       info( cust.PKCCustName);

       return ret;

    }

    thing is how to set it up in the form level..

    i cant assign it in the name stringedit control..

  • Suggested answer
    Abbas Ithayathullah Profile Picture
    175 on at

    Hi,

    You have to write like below,

    public void modified()

    {  

      PKCCustTable  cust;  // i believe this is your master table

    //Consider PKCSalesTable is the form in which we are going to write the code while selecting the foreginkey (PKCMobileNum) we are going to update the name field in PKCSalesTable

    ;

     select cust where cust.PKCMobileNum == PKCSalesTable.PKCMobileNum;

      if (cust )

      {

         PKCSalesTable.PKCCustName = cust.PKCCustName;

      }

      super();

    }

    Regarding,

    Abbas

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans