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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Dialog lookup

(0) ShareShare
ReportReport
Posted on by 578

Hello Martin!

I have a doubt, I made a table and I want to show its columns in a lookup, but what should I put in dialog.addField () ?, I do not have any extended fields.

My fields are:

IdRute (Int)

Location (String)
Description (String)

I like show Location and Description, my lookup class is:

public Common Entrega_Lookup(FormReferenceControl _control)
{
    SysReferenceTableLookup  tableLookup = SysReferenceTableLookup::newParameters(tableNum(EntregaMercancia), _control);
    Query query = new Query();
    QueryBuildDataSource qbds = query.addDataSource(tableNum(EntregaMercancia));

    tableLookup.parmQuery(query);
    tableLookup.addLookupfield(fieldNum(EntregaMercancia, Location));
    tableLookup.addLookupfield(fieldNum(EntregaMercancia, Descripcion));

    return tableLookup.performFormLookup();
}


And the Job is:

public void _Lookup(Args _args)
{
    Dialog dialog;
    DialogField field1;

    dialog = new Dialog("Location Name");
    field1 = dialog.addField(extendedTypeStr(SalesId));  <-- what should I put here

    field1.registerOverrideMethod(methodstr(FormReferenceControl, lookupReference),
        methodstr(Entrega, Entrega_Lookup),this);

    dialog.run();
}


if I put the extended data of salesid, it brings me salestable columns

Thanks in advance

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    Hi,

    you posted in a 4 year old discussion that was already marked as answered. I separated your question into a new thread.

    About your question, you should use the same data type that you want to return to that field. So in this case please use the same data type that your EntregaMercancia.Location has.

    Is that the field you want to return to the dialog? What about the "IdRute"?

    Anyway you should not use SalesId, unless you want to handle Sales order numbers in this field.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
Basit Profile Picture

Basit 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans