container dimCon = str2con(/92302-101/, /-/); List listValueContract = new List(Types::Class); // Depsrtments if(conPeek(dimCon, 2) != //) { valueContract = new DimensionAttributeValueContract(); valueContract.parmName(/Fund/ ); valueContract.parmValue(conPeek(dimCon, 2)); listValueContract.addEnd(valueContract); } accountContract = new LedgerAccountContract(); accountContract.parmMainAccount(conPeek(dimCon, 1)); accountContract.parmValues(listValueContract); validationContract = new LedgerAccountValidationContract(); validationContract.parmLedgerAccount(accountContract); validationContract.parmValidDate(systemDateGet()); dimensionStorage = DimensionServiceProvider::buildDimensionStorageForLedgerAccount(accountContract); validationStatus = LedgerDimensionValidationHelper::validateByTreeForCombination(DimensionStorage, today(), true, false ,false); Info(strFmt(/%1/,validationStatus)) ; }
container dimCon = str2con('92302-101', '-');
List listValueContract = new List(Types::Class);
// Departments
if (conPeek(dimCon, 2) != '')
{
valueContract = new DimensionAttributeValueContract();
valueContract.parmName('Fund');
valueContract.parmValue(conPeek(dimCon, 2));
listValueContract.addEnd(valueContract);
}
accountContract = new LedgerAccountContract();
accountContract.parmMainAccount(conPeek(dimCon, 1));
accountContract.parmValues(listValueContract);
validationContract = new LedgerAccountValidationContract();
validationContract.parmLedgerAccount(accountContract);
validationContract.parmValidDate(systemDateGet());
dimensionStorage = DimensionServiceProvider::buildDimensionStorageForLedgerAccount(accountContract);
validationStatus = LedgerDimensionValidationHelper::validateByTreeForCombination(dimensionStorage, today(), true, false, false);
info(strFmt("%1", validationStatus));
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,113 Super User 2024 Season 2
Martin Dráb 229,918 Most Valuable Professional
nmaenpaa 101,156