Sunday, 1 February 2015

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






No comments:

Post a Comment

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...