Thursday, November 27, 2025

Changing instance of class to extension class to trigger logic on extension layer

Details:

In case, extensible support for class instance to reinstance with different class to execute on Extension layer.


public static SANSyncInventTable construct(Common _record, Common _record_orig, boolean _isUpdate)

{

    SANSyncInventTable syncRecordInventTable;

    syncRecordInventTable = new SANSyncInventTable(_record, _record_orig, _isUpdate);

    return syncRecordInventTable;

}


[PostHandlerFor(classStr(SANSyncInventTable), staticMethodStr(SANSyncInventTable, construct))]

public static void SANSyncInventTable_Post_construct(XppPrePostArgs args)

{

    args.setReturnValue(SAN_SANSyncInventTable::construct(args.getArg(identifierStr(_record))

        ,args.getArg(identifierStr(_record_orig))

        ,args.getArg(identifierStr(_isUpdate))));

}


No comments:

Post a Comment

Override custom dimension value on posting sales invoice in X++

 Requirement: 1. Override custom dimension value on posting sales invoice 2.  Ledger posting type as "Cost of goods, invoiced" ...