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 :
Finance | Project Operations, Human Resources, ...
Unanswered

how to show custom as well as standard financial dimensions in form lookup field.

(0) ShareShare
ReportReport
Posted on by 167

Hi,

I have a custom form with datasource as PSAParameter(this datasource contains one string field and has a relation with DimensionAttributes.Name) and in one of the form control., I  need to show the lookup containing custom dimension names as well as standard dimension names that comes from GL>Chart of accounts>financial dimension.

So I tried to write the following piece of code inside formlookupeventhandler but while selecting dimension other than custom one it is throwing error :The value 'A' in field 'Custom project dimension' is not found in the related table 'Dimension'.

QueryBuildDataSource qbds;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(DimensionAttribute), sender);
Query query = new Query();qbds = query.addDataSource(tableNum(DimensionAttribute));
qbds.addRange(fieldNum(DimensionAttribute,BackingEntityTableId)).value(queryValue(tableNum(DimensionFinancialTag)));

//The value A is coming from DimensionAttribute.BackingEntityTablename=OMOperatingUnit

qbds.addRange(fieldNum(DimensionAttribute, BackingEntityTableId)).value(queryValue(tableNum(OMOperatingUnit)));

sysTableLookup.addLookupfield(fieldNum(DimensionAttribute, Name));
sysTableLookup.addLookupfield(fieldNum(DimensionAttribute, ReportColumnName));

sysTableLookup.parmQuery(query);

sysTableLookup.performFormLookup();

FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs;
ce.CancelSuperCall();

Please suggest me where I am getting wrong.

Thanks!!

I have the same question (0)
  • Martin Dráb Profile Picture
    238,740 Most Valuable Professional on at

    Can you show us the relation, please?

  • D365 ER Profile Picture
    167 on at

    The relation is PSAParameter.CustomDimesion= DimensionAttribute.Name

    Here CustomDimesion is string field Whose EDT is name.

  • Martin Dráb Profile Picture
    238,740 Most Valuable Professional on at

    Let's forget the lookup for a moment.

    Are you saying that you have DimensionAttribute record with Name = A but if you put A to CustomDimesion field, you get an error when saving PSAParameter record?

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 577 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 309

#3
Diego Mancassola Profile Picture

Diego Mancassola 259

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans