Skip to main content

Notifications

Announcements

No record found.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans