Skip to main content

Notifications

Microsoft Dynamics AX (Archived)
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Dynamics 365 Foe) Financial Dimension Name Issue

Posted on by Microsoft Employee

Hello.

I have some problems.

I created a lookup method that shows DisplayValue and Name corresponding to Business Area.

I can see the DisplayValue, but I can't see the Name.

//[FormControlEventHandler(formControlStr(SalesCreateOrder, DimensionLookupControl), FormControlEventType::Lookup)]
//public static void DimensionLookupControl_OnLookup(FormControl sender, FormControlEventArgs e)
[FormControlEventHandler(formControlStr(SalesCreateOrder, SalesTable_TYM_AR_BusinessArea), FormControlEventType::Lookup)]
public static void SalesTable_TYM_AR_BusinessArea_OnLookup(FormControl sender, FormControlEventArgs e)
{

// FormStringControl control = dialog.formRun().controlCallingMethod();

Query query1 = new Query();
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
DimensionAttribute dimAttr;
;
dimAttr = DimensionAttribute::findByName("BusinessArea");

SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(DimensionAttributeValue), sender);

query1.addDataSource(tablenum(DimensionAttributeValue)).addRange(fieldNum(DimensionAttributeValue,DimensionAttribute)).value(queryValue(dimAttr.RecId));
sysTableLookup.addLookupfield(fieldNum(DimensionAttributeValue, DisplayValue));
sysTableLookup.addLookupMethod(tableMethodStr(DimensionAttributeValue, getname));
//this code is to add the ranges for filtering
sysTableLookup.parmQuery(query1);
sysTableLookup.performFormLookup();


}

I developed it by referring to the source on the Internet.

Business Area Name
1000  
2000  
3000  
4000  

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,297 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans