最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

In Microsoft Dynamics AX, how to get a look up of all the tables available in AOT

网络文摘 William 2466浏览 0评论
This article explains you how to get a look up to a control for All the AOT tables and can answer to below relevant questions.

·  Create a look up to show all the tables from AOT.
·  How to develop a drop down to show all the AOT tables where user can select one among?
·  How to create an edit method in Microsoft Dynamics AX?

Applied on: Dynamics AX 2012 R2
Prerequisite: X++; MorphX; Basic programming knowledge
Target audience: Any
Image1

 
 

 

 

 

 

Output: Look up of all the AOT tables

Create a table with a single field. Here my table name is TableLookUp with field name TableObjID.

The field should be extended to RefTableId EDT as shown below.

 

Image2


Write an edit method to your table. I wrote a method in the name of tableObject2Name. The method looks like:

// This method returns table name

// BP deviation documented
edit TableName tableObject2Name(boolean _set, TableName _name) // System Documentation>Type>TableName
{
    Dictionary dictionary;
    TableId tableID;

    if (_set)

    {
        dictionary = new Dictionary(); // System Documentation>Classes>Dictionary
        tableID = dictionary.tableName2Id(_name);

        if (tableID)

        {
            this.TableObjID = tableID;
        }
    }
    return tableid2name(this.TableObjID);
}

Create a new form and use the table you created as data sources and method to get a control.

Here my form looks like:
 Image3

转载请注明:ww12345678 的部落格 | AX Helper » In Microsoft Dynamics AX, how to get a look up of all the tables available in AOT

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址