Monday, September 12, 2016

Changing Customer Accoount Posted customer Transaction in GL ax 2012

// Changing Posted customer Transaction in GL ax 2012

Updating Posted customer transaction Payments with different customer Account .

Note:
1) Both Customers  should lie on same customer Posting profile account then only below logic will work.
2) If there is settlement update settlement Table also(CustSettlement)
3) Applicable only when customer transaction created and posted in Gl and AR Payment Journal. Not for customer invoice.

    LedgerJournalTrans          jourTrans;
    CustTrans           custTrans;
    LedgerDimensionAccount  ledgerDim;
    ;
    ledgerDim = DimensionStorage::getDynamicAccount("CustomerAccount", LedgerJournalACType::Cust);
   
    update_recordSet jourTrans setting LedgerDimension = ledgerDim
        where jourTrans.Voucher == "VoucherNum";
    update_recordSet custTrans setting AccountNum = "CustomerAccount",OrderAccount = "CustomerAccount"
        where custTrans.Voucher == "VocuherNum";

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...