Pre/Post event handlers

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

_args.getArg('_argumentName')
_args.getThis()
_args.setArg()
_args.setReturnValue()

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));
        }
    }
}



 

Search

About

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