Create Ledger dimension from string values

1 – By using the below code one can create ledger dimesion recId using X++ Combination of Main Account and DimensionValue container offsetAccount; RefRecId ledgerDimension; offsetAccount = [‘11850000’, ‘11850000’, 3, ‘Department’, ‘101’, ‘Customer’,‘Cus-101’, ‘Vendor’, ‘Vend-101’]; //[MainAccount,MainAccount, NoOfDimensions, DimensionName, value] ledgerDimension = AxdDimensionUtil::getLedgerAccountId(offsetAccount); 2 – Create Ledger dimension from main account (default account) and default dimension […]

Create Default dimension using x++

The following job will get a DimensionAttributeValueSet record ID base on the a set of dimension values.   static void CreateDefaultDimensions(Args _args) { PurchTable purchTable; DimensionAttributeValueSetStorage valueSetStorage = new DimensionAttributeValueSetStorage(); DimensionDefault result; int i; DimensionAttribute dimensionAttribute; DimensionAttributeValue dimensionAttributeValue; // Note that “Item” is not one of the default dimension, // but DimensionAttributeValueSetStorage will handle it […]