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!!