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
Post a Comment