Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Tuesday, September 30, 2014

Main account and dimension relation in AX


Hi,

static void AlfasithMainAccDimRel(Args _args)

{
    MainAccount     mainAccount;
    DimensionAttributeValueCombination  dimensionAttributeValueCombination;

    select mainAccount where mainAccount.MainAccountId == "140250"
                        &&  mainAccount.LedgerChartOfAccounts == LedgerChartOfAccounts::current();

     select dimensionAttributeValueCombination where dimensionAttributeValueCombination.MainAccount == mainAccount.RecId;
    print dimensionAttributeValueCombination.RecId ;

    pause;
}

Regards,

No comments:

Post a Comment

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...