Pre/Post event handlers

For table methods all event handlers should be placed in TableName EventHandler class


public static void K3PostDefaultWMSLocation(XppPrePostArgs _args)
    InventTransferLine InventTransferLine   = _args.getThis();
    InventDim          inventDim            = _args.getArg('_inventDim');
    InventLocationId   inventLocationId     = inventDim.InventLocationId;
    InventLocation     inventLocation;

    if (inventLocationId != _args.getArg('_inventLocationId'))
        inventLocationId = _args.getArg('_inventLocationId');

    if (InventTransferLine.K3POSUpdated && inventLocationId)
        inventLocation = InventLocation::find(inventLocationId);
        if (NoYes::Yes == inventLocation.WHSEnabled && inventLocation.RBODefaultWMSLocationId)
            _args.setReturnValue(WMSLocation::find(inventLocation.RBODefaultWMSLocationId, inventDim.InventLocationId));


About is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.

Authors are allowed to set their own AdSense units.
Join us.

Blog Tags