Does experience count, As ERP consultant, There are always new challenge. With 7 years core Dynamics Customization Experience, Still found new things to learn. Experience told you how to hide your fear of unknown and possibility.
Today very small tip. Which i resolve with experience. We usually create Ledger General With X++ code. The code is available in many webs sites. But today I need to copy financial dimension of Customer/ Vendor/Bank/ Assets to Ledger Journal trans. I found function in AxdDimensionUtil Class provide the functionality.
The code snippet is as follow. The ledger Journal trans have to two default dimension, one for account and second for offset account.
Suppose we are copy financial dimension form customer account to customer.
trans.parmAccountType(LedgerJournalACType::Cust);
custTable =CustTable::find(_account);
conDim= AxdDimensionUtil::getDimensionAttributeValueSetValue(custTable.DefaultDimension);
trans.parmDefaultDimension(AxdDimensionUtil::getDimensionAttributeValueSetId(conDim)
);