Sunday, 18 March 2018

How to refresh the form from the class after an update in AX 2012

  

    Scenario: Here, Let's take Purchase confirmation report as example. If SRSPrintMediumType is Email, I have to track the information ( to whom the email was sent, at what time) in purchase order confirmation form under new tab named tracking tab. Log records will be inserted inside the class. Once the Email has been sent, form has to be refreshed.

 Under PurchPurchaseOrderController class, under main method - after the report operation has been completed

     if (formHasMethod(_args.caller(), identifierStr(refreshPurchComDS)))
    {
       _args.caller().refreshPurchComDS();
    }
     Method refreshPurchComDS():

    public void refreshPurchComDS()
{
    DWPurchComEvents_ds.reread();
    DWPurchComEvents_ds.refresh();
    DWPurchComEvents_ds.research();
}



}
}



s





No comments:

Post a Comment