Multiple PDC(Post Dated Cheques) Settlement In Ax 2012

Hello guys,

Problem :

In Ax 2012 R2 we don't have functionality to post multiple PDC's at one go

Solution :

We need a simple customization to enable this functionality

Steps :

-> Go to AOT->Forms-> VendPostDatedChecks->Designs->ActionPaneTab->SettleClearingTransaction

-> open properties of "SettleClearingTransaction" and change property "Multiselect" to "Yes"
-> In form design Go to ListPageGrid properties and change "Autodeclaration" to "Yes"
-> copy and paste the below code in Click method in "SettleClearingTransaction" button.


void clicked()
{
    //NS - Added by Rahul for multiselect posting option
    boolean multiSelected;
    CustVendPDCRegister _custVendPDCRegister,custVendPDCloc;
    super();
    if(CustVendPDC_ds.anyMarked())
    {
        _custVendPDCRegister = CustVendPDC_ds.getFirst(true);
        while(_custVendPDCRegister)
        {
            custVendPDCloc =            CustVendPDCRegister::findByReference(_custVendPDCRegister.LedgerJournalTrans);
            if(custVendPDCloc.PDCStatus == PostDatedCheckStatus::Posted)
            {
                CustVendPDCManager::settleClearingTransactions(custVendPDCloc);
                multiSelected = true;
            }
            _custVendPDCRegister = CustVendPDC_ds.getNext();
        }

    }
    if (multiSelected)
    {
        CustVendPDC_ds.research();
        CustVendPDC_ds.first();
        CustVendPDC_ds.mark(0);
        ListPageGrid.setFocus();
    }
    else
    {
        CustVendPDC_ds.reread();
        CustVendPDC_ds.active();
    }
        //NE - Added by Rahul for multiselect posting option
}


@Rahul Talasila






Comments

Popular posts from this blog

Filter Records on Item Lookup Through X++ - Ax 2012

How to Install Management Reporter in Ax 2012 R3

Settle Vendor Invoice/Payment through X++ code - AX 2012