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

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...