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 :
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
    237,965 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
    237,965 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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans