Hi all,
I tentatively defined the following two Classes:
internal final class getDimensionValue
{
public static str getDimensionDisplayValue(RecId defaultDimension, Name dimName)
{
DimensionAttributeValueSetStorage dimStorage;
dimStorage = DimensionAttributeValueSetStorage::find(defaultDimension);
return dimStorage.getDisplayValueByDimensionAttribute(DimensionAttribute::findByName(dimName).RecId);
}
}
[ExtensionOf(formDataSourceStr(SalesTable, SalesTable))]
internal final class SalesTableForm_SalesTableDS_NewDelivery_Extension
{
public int active()
{
int ret;
str dimensionAttribute;
SalesTable salesTable;
ret = next active();
dimensionAttribute = getDimensionValue::getDimensionDisplayValue(salesTable.DefaultDimension, 'CostCenter');
Info(dimensionAttribute);
return ret;
}
}
Yes, I am trying to get the value of ‘CostCenter’ in the ‘active’ method of the SalesTable data source. I don’t know if this will achieve my goal, but I thought I should give it a try.
Then I got an error when testing:
When I clicked on the sales order details, the system reported this error.
I then tried to modify the two classes mentioned above, and even deleted them, but to no avail, the error still exists.
I don’t know how to fix this error , please help me.