Thursday, May 23, 2013

Upload Financial Dimension Value For Dynamic AX 2012

Here goes the scenario for upload financial dimension value for Dynamic AX 2012

Example : You have financial dimension : Department and you want to insert or add  financial dimension value into it.

here goes the scripts :
static void TCN_DPRcreateDimensionValue(Args _args)
{
DimensionValueService service;
DimensionValueContract dimensionValueContract;
TCN_FinancialDimensionValueTemp dimTemp;


service = new DimensionValueService();
dimensionValueContract = new DimensionValueContract();
try
{
while select dimTemp order by FinancialDimension
{

dimensionValueContract.parmDescription(dimTemp.FinancialDimensionDescription); //financial dimension value description
dimensionValueContract.parmValue(dimTemp.FinancialDimensionValue); //financial dimension value;
dimensionValueContract.parmDimensionAttribute(dimTemp.FinancialDimension); //financial dimension
service.createDimensionValue(dimensionValueContract);
}

}
catch
{
ttsAbort;
}
info("Hore Sukses");
}

Good Luck
Please suit for your needs :D
Dwipa

1 comment:

Unknown said...

Hai Dwipa,

Apa kbr?
Ini g Albert ex Techno One.
Boleh minta tolong gak?
Boleh nanya gak?
Itu mksd script lu apa ya? Itu lu pake temporary table dulu atau gmn? Script nya itu utk ngelakuin ngejlnin apa?