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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Table list menu as EDT

(0) ShareShare
ReportReport
Posted on by 3,850

Hello

I'm programming a RunBase dialog and I need to have one field who display list of specific table.

Like EDT: FileNameOpen who have button to open dialog box, so I can choose a file, and then display the URL in the line where the file is, I need a EDT who can display data in specific table - so the user can choose a record to work with.

Any ideas?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    In standard AX we already have this.

    EDT called TableName and RefTableId

    same functionality which you are looking is implemented in SysExpImpTables Form

    you need to override the lookup method TableName TextBox

    Please verify for standard form and update with your findings..

    Hope this will help you.

  • Suggested answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    "EDT who can display data in specific table" sounds like a normal lookup. It is so?

    The easiest way is to add a relation (or a reference table in AX 2012) to the data type. It it isn't possible, you can design a lookup form in AOT and referenced from EDT's FormHelp property (see Lookup Form for details).

    You can also override the lookup() method on a form control or a data source field (if applicable).

  • Sandri Profile Picture
    3,850 on at

    Hi thanks for the help.

    But that isn't working as I want it to work.

    Here are more detailed introduction so you can see what I mean:

    1) I write a Class as a FormRun class

    protected Object dialog()
    {
    Dialog dialog;
    DialogGroup myDialog;

    dialog = super();

    dialog.caption("Balance Score Report");

    location = dialog.addField(extendedTypeStr(LocationEDT));
    staff = dialog.addField(extendedTypeStr(StaffEDT));

    return dialog;
    }

    2) The problem is that I cant get drop down menu from StaffEDT. If I change the line as follows:

    staff = dialog.addField(extendedTypeStr(Currency)); //where the currency is also EDT

    I could get a list of the Currency table.

    3) So I demonstrate the Currency table and the Currency EDT and tried to do the same thing for StaffEDT where I created myself.

    • I created EDT named StaffEDT as a String EDT.
    • Property for EDT:
      • Reference table: DirPerson //who is Table
      • Extend: TableName //who is EDT

    The resault is that I get a table with the list of all existing tables as far as I see it.

    What do I need to do else?

  • Verified answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    So you're using AX 2012.

    The type is already there - it's called DirPersonRecId.

  • Sandri Profile Picture
    3,850 on at

    Hi Martin.

    Thanks Martin.

    Just to have that recorded, I noticed that this EDT belongs to DirPartyTable - but not to DirPerson.

    In this work I create a new EDT who extend the DirPersonRecId EDT. But that EDT belongs to DirPartyTable, so I needed to determine the related table to my EDT to DirPartyTable.

    So if you are working with tables who have relations to another table, and the EDT belongs to specific field in the relation table you have to determine the Related Table field properties in EDT to the right table.

    But it's working fine now, and the DirPerson table who I'm working on take changes as suspected.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans