Sunday, 28 June 2020

D365 TABLE INITVALUE EVENT HANDLER CODE X++

TABLE INITVALUE DATASOURCE PRE AND POST EVENT HANDLERS FOR INIT METHOD
Write the below code in the form extension class

   /// <summary>
    ///
    /// </summary>
    /// <param name="args"></param>
    [PostHandlerFor(tableStr(SalesTable), tableMethodStr(SalesTable, initValue))]
    public static void SalesTable_Post_initValue(XppPrePostArgs args)
    {
        SalesTable SalesTable = args.getThis() as SalesTable;
        SalesTable.test_PrintNote=NoYes::Yes;
    }

1 comment:

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++  Introduction In our previous posts, we explored what Copilot can do o...