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

Notifications

Announcements

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)
  • Suggested answer
    Anton Venter Profile Picture
    20,550 Super User 2025 Season 2 on at

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

  • Suggested answer
    Sohaib Cheema Profile Picture
    49,621 User Group Leader on at

    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;

       }

    }

  • 5400 Profile Picture
    7,162 on at

    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
    Viral Suthar Profile Picture
    279 on at

    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...

  • Community Member Profile Picture
    on at

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

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
TAHER_El_Mehdi Profile Picture

TAHER_El_Mehdi 3

#2
Mea_ Profile Picture

Mea_ 2

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans