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)

Look Up (Custom Dimension)

(0) ShareShare
ReportReport
Posted on by

Dear Experts

I have custom dimension "Location" for city names how  can i get values entered for that dimension to show in Look Up,  which table/Method i have to mention in look up parameter I am new in X++

Thanks & Regards

Afridi

*This post is locked for comments

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,025 Super User 2025 Season 2 on at

    Hi Afridi,

    The financial dimension framework is quite difficult to understand. You can use the next coding for a dimension lookup.

    You can create a lookup method on the form object itself. Fill the dimensionName variable with your "location" dimension name. Note that this code is copied from a class. On form level you probably have to adjust parameters.

    protected static client void lookupDimension(FormStringControl _stringControl, Name _dimensionName)

    {

       Args                    e;

       FormRun                 lookupFormRun;

       DimensionAttribute      dimAttr;

       if (_stringControl != null)

       {

           // Construct arguments for the custom lookup

           e = new Args();

           e.name(formStr(DimensionDefaultingLookup));

           e.lookupValue(_stringControl.text());

           e.caller(_stringControl);

           // Find the dimension attribute associated with the string control which called this method

           dimAttr = DimensionAttribute::findByName(_dimensionName);

           e.lookupField(dimAttr.ValueAttribute);

           e.record(dimAttr);

           // Run the custom lookup and init the lookup form

           lookupFormRun = classfactory.formRunClass(e);

           lookupFormRun.init();

           _stringControl.performFormLookup(lookupFormRun);

       }

    }

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