Update Financial Dimension from X++ Code

Hi Friends,
Today I got one new update with Item Master, Now I’m going to share with you those thing. Update Financial Dimension from X++ code.
Using upload method initially I have updated the Item masters in AX without updating the Financial Dimension. After that I realised I was missed it, then I got the JOB for updating those financial Dimension without affecting any Master. Really it was reduced my time and headache. I’m going to share those things to all AX team in the world.
                This Job is updated based on the Item Master so just type the Financial Dimension in ‘*****’ and then update the Item group instead of ‘#####’.
Create a new Job and copy this below code and Paste and run.

static void updateFinancialDimension(Args _args)
{
    InventTable         inventTable;
    InventItemGroupItem inventItemGroupItem;
    Struct struct = new Struct();
    container ledgerDimension;
    DimensionDefault DimensionDefault;
    ;
    struct.add('Business Unit', '*****');
    ledgerDimension += struct.fields();
    ledgerDimension += struct.fieldName(1);
    ledgerDimension += struct.valueIndex(1);
    DimensionDefault = AxdDimensionUtil::getDimensionAttributeValueSetId(ledgerDimension);
    While Select forupdate inventTable join inventItemGroupItem where inventTable.ItemId == inventItemGroupItem.ItemId &&
                                                            inventItemGroupItem.ItemGroupId =='#####'
    {   
        ttsBegin;
   // inventTable = InventTable::find(_itemId, true);
    inventTable.DefaultDimension = DimensionDefault;
    inventTable.update();
        ttsCommit;
    }
    info(strFmt('Completed'));
}


Enjoy It…!

2 comments:

  1. Awesome article to nice sharing. Training and certification on courses helps you to study this technology in future.For more details please visit our website.
    Oracle Fusion Financial Training Institute

    ReplyDelete
  2. Private wealth management, usually abbreviated as PWM describes the investment and financial management services offered to investors and include aspects such management of trusts, real estate, businesses and stocks planning. Investors with vast estates and business usually desire a level of anonymity and most of the time the banking transactions are handled with high security levels and strict rules on confidentiality. Most of these investors need a dedicated account manager and a financial advisor who will guide them in the different aspects of the management of their wealth. Many financial and investment institutions offer these kinds of services and in order to find the best type, the investor should ensure that they check out a number of things in order to select the most effective financial advisor. Milton barbarosh

    ReplyDelete