Wednesday, August 17, 2022

To extend the constructor to instantiate the extended (Custom) class in D365FO


    [PostHandlerFor(classStr(<Std class name>), staticMethodStr(<Std class name>, construct))]

    public static void <Std class name>_Post_construct(XppPrePostArgs args)

    {

        <Std class name>  objCls;

        objCls= args.getReturnvalue();       

        args.setReturnValue(<Custom class name>::construct(args.getArg(identifierStr(<Argument name>)),args.getArg(identifierStr(<Argument name>))));

    }

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...