7) Passing values between PreHandler & PostHandler

Passing values between PreHandler & PostHandler 


using the below code you can pass the custom value between pre handler and post handler


Example


  /// <summary>
    /// enforcePayRateTolerance pre event hanlder
    /// </summary>
    /// <param name="args">Event args</param>
    [PreHandlerFor(tableStr(HRMCompFixedPlanTable), tableMethodStr(HRMCompFixedPlanTable, enforcePayRateTolerance))]
    public static void HRMCompFixedPlanTable_Pre_enforcePayRateTolerance(XppPrePostArgs args)
    {
   

        args.addArg("Tolerance""Vinay Tak");

    }







 Example
    /// <summary>
    /// enforcePayRateTolerance post event hanlder
    /// </summary>
    /// <param name="args">Event args</param>
    [PostHandlerFor(tableStr(HRMCompFixedPlanTable), tableMethodStr(HRMCompFixedPlanTable, enforcePayRateTolerance))]
    public static void HRMCompFixedPlanTable_Post_enforcePayRateTolerance(XppPrePostArgs args)
    {
      

        if (args.existsArg("Tolerance"))
        {
           Info( args.getArg("Tolerance"))

     
        }
    }

Comments

Popular posts from this blog

Customization on Sales invoice Report in D365 F&O

75) COC - Create a coc of the table modified method

46) D365 FO: SHAREPOINT FILE UPLOAD USING X++