Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Cannot find SysMultiTableLookup class in AX 2012 R2

Posted on by 2,650

Hi,

I've read a few posts about SysMultiTableLookup class but I don't appear to have it in AX 2012 R2.

Is this only available in a certain build?

Could someone send me an xpo with the class or post the code for it so I can copy it as I require it for a complex lookup override.

Thanks

*This post is locked for comments

  • Suggested answer
    RE: Cannot find SysMultiTableLookup class in AX 2012 R2

    Just found this post while replying on another thread.

    Here's the original blog post of mine about this class, the guy in the other blog post is a shameless copy/paster :(

    kashperuk.blogspot.dk/.../sysmultitableloookup-dynamic-lookups.html

  • Verified answer
    Kauto Profile Picture
    Kauto 2,650 on at
    RE: Cannot find SysMultiTableLookup class in AX 2012 R2

    I came across this article on a post elsewhere - I have employed this mechanism to achieve what I need - it is actually very easy to do and makes sense.

    It is actually very easy to combine multiple datasources in a sysTableLookup. Here is the trick I used to be able to filter on the name from the EcoResProductTranslation in the lookup for items.

    1) Create a view that combines all your datasources and add the fields you would like to see in your lookup to the view.

    2) Create a query from the view created in step 1.

    3) Use these to perform your lookup as follows...

    static client void lookupItemActive(FormStringControl _ctrl)

    {

       SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(<ViewName>),_ctrl);

       Query          query = new Query(queryStr(<QueryName>));

       sysTableLookup.addLookupfield(fieldnum(<ViewName>, ItemId));

       sysTableLookup.addLookupfield(fieldNum(<ViewName>, Name));

       sysTableLookup.addLookupfield(fieldNum(<ViewName>, ItemGroupId));

       sysTableLookup.addLookupfield(fieldnum(<ViewName>, Status));

       sysTableLookup.addLookupfield(fieldnum(<ViewName>, RevId));

       sysTableLookup.addLookupfield(fieldnum(<ViewName>, ItemType));

       sysTableLookup.parmQuery(query);

       sysTableLookup.performFormLookup();

    }

  • Kauto Profile Picture
    Kauto 2,650 on at
    RE: Cannot find SysMultiTableLookup class in AX 2012 R2

    Thanks for clarifying this for me Stephan, I thought I was going mad when I couldn't find it in the AOT, despite some forum posts mentioning it.

    In addition to this, I am trying to override the customer lookup on the SalesCreateOrder form, I had presumed this is controlled by the form CustTableLookup but this doesn't seem to be the case, could you direct me on how this lookup is controlled?

    I would simply override the code on the form, but when I add in the tableMethodStr name to return the customer name, I get a blank value.

    Using:

    SysTableLookup.lookupMethod(tableMethodStr(CustTable,Name));

    Hoping to return the customer name by using the name display method against the CustTable

  • Verified answer
    Stefan Hofmaninger Profile Picture
    Stefan Hofmaninger 520 on at
    RE: Cannot find SysMultiTableLookup class in AX 2012 R2

    Hi,

    I think this class is not standard in AX 2012 -> I have also downloaded this class as an xpo an made a few corretions in the code.
    Here's a link where you can download the class:

    http://axbooster.blogspot.co.at/2014/05/lookup-from-multiple-table-ax-2009.html

    Regards

    Stefan

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot find SysMultiTableLookup class in AX 2012 R2

    I cannot find it in fully patched R1,R2 or R3.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans