Function DimensionValidationRequest::newForLedgerDimensionType has been incorrectly called inD365 F&O
Add below peace of code to create ledger dimensions the issue will be resolved.
public DimensionDynamicAccount getMainaccount()
{
DimensionDynamicAccount offsetLedgerDim;
MainAccountNum MainAccountID;
Array acctDimAttrArray = new Array(Types::String);
acctDimAttrArray.value(1,"MainAccount");
Array acctDimArray = new Array(Types::String);
MainAccountID = MainAccount::findByLedgerDimension(AssetParameters::find().DimensionAttributeValueCombination).MainAccountId;
acctDimArray.value(1,MainAccountID);
DefaultDimensionIntegrationValues DefaultDimensionIntegrationValues = DimensionResolver::getEntityDisplayValue
(acctDimAttrArray, acctDimArray, extendedTypeStr(DimensionDynamicAccount), LedgerJournalACType::Ledger);
DimensionDynamicAccountResolver DimensionDynamicAccountResolver = DimensionDynamicAccountResolver::newResolver
(DefaultDimensionIntegrationValues, LedgerJournalACType::Ledger, curExt());
return DimensionDynamicAccountResolver.resolve();
}
No comments:
Post a Comment