Hi All,
I have a ledger dimension which I want to validate against an account structure in my code, can you please suggest if I can do that and how.
Cheers!
*This post is locked for comments
Hi Kumar,
Coding can be divided in this way,
Thank you Dominic,
I use one transaction with two items and a financial dimension that is different, but I get a bug like this
Function DimensionDefaultingEngine::insertDimensionSpecifer has been incorrectly called.
help me
Thanks for the response Dominic,
I found a way to do it by following code
DimensionValidation::validateByTree(ledgerDimensionRecId,today(),true)
I didn't needed to go into service which I am sure will be required in other complex scenarios
Hi,
Please try this:
static void ValidateLedgerDimension(Args _args)
{
str mainAcctNum = "110130";
LedgerAccountValidationContract validationContract;
LedgerAccountContract accountContract;
DimensionAttributeValueContract valueContract;
FinancialDimensionValidationService service;
List listValueContract = new List(Types::Class);
// Business Unit
valueContract = new DimensionAttributeValueContract();
valueContract.parmName("BusinessUnit");
valueContract.parmValue("002");
listValueContract.addEnd(valueContract);
// Department
valueContract = new DimensionAttributeValueContract();
valueContract.parmName("Department");
valueContract.parmValue("028");
listValueContract.addEnd(valueContract);
accountContract = new LedgerAccountContract();
accountContract.parmMainAccount(mainAcctNum);
accountContract.parmValues(listValueContract);
validationContract = new LedgerAccountValidationContract();
validationContract.parmLedgerAccount(accountContract);
validationContract.parmValidDate(systemDateGet());
service = new FinancialDimensionValidationService();
if (service.validateLedgerAccount(validationContract))
{
info("Valid");
}
else
{
info("Invalid");
}
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156