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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Display method

(0) ShareShare
ReportReport
Posted on by

Scenario:

I have 3 fields in table 1: ID, name, phone Num

In table 2 i have Id and Name.

I have created relation between tables

Requirement: When i select id in table 2 i should get name of that person in name field.

How to achieve this ??

can we achieve this using display method?

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Display method

    Thank you Suthar...I have achieved the result by this method....When i use modify method the fetching is delayed...

  • Suggested answer
    Viral Suthar Profile Picture
    279 on at
    RE: Display method

    Hi, If ID is a primary key field in both tables, then why you need to store name again, just show it using display method from table 1 (master table) like custTable and salesTable, you just have to select customer account and it will automatically display the name from masters...

  • 5400 Profile Picture
    7,162 on at
    RE: Display method

    What is your scenario:

    1. If you want to fetch the  data from table 1 with respect table 2 ID , Assume ID is the relation between two table.

    if you want to display in in same buffer

    you can write modify method to display

    select firstonly table1 wher t1.id = t2.id

    t2.name = t1.name

    of if you don't have bound control you can write display method in tabel and display in UI and do the cache

    same way

    purblic display EDt meth()

    {

      select firstonly table1 wher t1.id = t2.id

      return table1 .name  whatever.

    }

    Please need more info for deatils.

  • Suggested answer
    Sohaib Cheema Profile Picture
    48,476 User Group Leader on at
    RE: Display method

    use modifiedField() method on Table2 and write a switch case with example as under

    public void modifiedField(FieldId _fieldId)

    {

    super(_fieldId);

       switch (_fieldId)

       {

           case fieldNum(Table2Name, Id):

            Table2Name.NameField = "any value";

           break;

       }

    }

  • Suggested answer
    Anton Venter Profile Picture
    20,273 Super User 2025 Season 2 on at
    RE: Display method

    Hi, you can achieve this with an edit method, also see Axaptapedia. Also, there are many examples of this in the application.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#1
Guy Terry Profile Picture

Guy Terry 2 Moderator

#1
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans