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)

Look up Name instead of ID in AX 2012

(0) ShareShare
ReportReport
Posted on by 5,680

Hi all,

I have created a custom table (AX_Test) with two string fields:

  1. ID created EDT with reference table as AX_Test ID as relation
  2. Name

When using ID field in existing table (e.g. Invent table) normally the field value look up is ID value from AX_Test table, store the ID value in Invent table this is the normal process.

But I need when look up in ID get look up value in Name instead of ID but store ID value in back end.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Pradeep Itnal Profile Picture
    3,248 on at
    RE: Look up Name instead of ID in AX 2012

    Write a "Find"method on your , AX_Test table , and get the name associated with the ID.

    Create a display method on InvenTable and call it from form to show the name.

    Hope it helps.

  • Suggested answer
    Jonathan  Halland Profile Picture
    11,310 on at
    RE: Look up Name instead of ID in AX 2012

    Hi Karthik.

    On your custom table add both the ID and the Name field to your AutoLookup field group. This will then display the name in the lookup as requested.

  • Karthik Desappan Profile Picture
    5,680 on at
    RE: Look up Name instead of ID in AX 2012

    Hi Jonathan,

    i already tried this scenario the id and name get look up but when selecting a value id populate in the field value but i need populate name instead of id but stored value back end id value corresponding name.

  • Suggested answer
    Martin Dráb Profile Picture
    236,320 Most Valuable Professional on at
    RE: Look up Name instead of ID in AX 2012

    Consider using a reference to the surrogate key + reference group, instead of storing string ID in reference tables. Then you can easily choose whether the surrogate key will be replaced by ID or Name.

    Look at my blog post for more details.

  • Karthik Desappan Profile Picture
    5,680 on at
    RE: Look up Name instead of ID in AX 2012

    Hi martin,

    when i use reference group concept in the back store recid..i need to store string id and user look up value in the form as name.

  • dolee Profile Picture
    11,279 on at
    RE: Look up Name instead of ID in AX 2012

    Hi Karthik,

    But why not RecId? Using the surrogate key as the reference field is encouraged starting in AX2012. That's also why the reference group control is added.

    Having said that, you can probably achieve what you mention by using edit method (msdn.microsoft.com/.../aa637541.aspx;MSPPError=-2147217396) and customize the lookup (devexpp.blogspot.hk/.../dynamics-ax-custom-lookup.html)

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
Community Member Profile Picture

Community Member 4

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

#2
NNaumenko Profile Picture

NNaumenko 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans