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", "Sheikh Sohail Hussain");

    }







 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"))

     
        }
    }

Support Faryal's Cusine


Customization Analysis Report D365FO



Customization Analysis Report D365FO



What is the Customization Analysis Report?

The Customization Analysis Report is a tool that analyzes your customization and extension models and runs a predefined set of best practice rules. The report is one of the requirements of the solution certification process. The report is in the form of a Microsoft Excel workbook.

How to generate the report

To generate the Customization Analysis Report, run the following command in a development environment.


xppbp.exe -metadata=<local packages folder> -all -model=<ModelName> -xmlLog=C:\BPCheckLogcd.xml -module=<PackageName> -car=<reportlocation>


Open Command Prompt and run the below script... please change the path as per your environment folder hierarchy.

CD C:\AOSService\PackagesLocalDirectory\Bin






I have 4 Submodels in my Main module... You can check in below screenshot.




Module
  1.      SLDTaxationSuite
Model
  1. SLD_Taxation_Suite
  2. SLD_Ext_Common_Resource_PAK
  3. SLD_Ext_Taxation_PAK
  4. SLD_Ext_Taxation_Reports_PAK

So I need to create 4 different scripts for all models.


Model :  SLD_Taxation_Suite

xppbp.exe -metadata=C:\AOSService\PackagesLocalDirectory -all -model="SLD Taxation Suite" -xmlLog=C:\Car\Log\BPCheckLog_SLD_Taxation_Suite.xml -module="SLDTaxationSuite" -car=c:\CAR\SLD_Taxation_Suite.xlsx


Model :  SLD_Ext_Common_Resource_PAK

xppbp.exe -metadata=C:\AOSService\PackagesLocalDirectory -all -model="SLD Ext Common Resource PAK" -xmlLog=C:\Car\Log\BPCheckLog_SLD_Ext_Common_Resource_PAK.xml -module="SLDTaxationSuite" -car=c:\CAR\SLD_Ext_Common_Resource_PAK\SLD_Ext_Common_Resource_PAK.xlsx


Model :  SLD_Ext_Taxation_PAK

xppbp.exe -metadata=C:\AOSService\PackagesLocalDirectory -all -model="SLD EXT TAXATION PAK" -xmlLog=C:\Car\Log\BPCheckLog_SLD_EXT_TAXATION_PAK.xml -module="SLDTaxationSuite" -car=c:\CAR\SLD_EXT_TAXATION_PAK\SLD_EXT_TAXATION_PAK.xlsx


Model :  SLD_Ext_Taxation_Reports_PAK

xppbp.exe -metadata=C:\AOSService\PackagesLocalDirectory -all -model="SLD Ext Taxation Reports PAK" -xmlLog=C:\Car\Log\BPCheckLog_SLD_Ext_Taxation_Reports_PAK.xml -module="SLDTaxationSuite" -car=c:\CAR\SLD_Ext_Taxation_Reports_PAK\SLD_Ext_Taxation_Reports_PAK.xlsx





Please feel free to contact me if you are facing any issues during the following the above blog.



Support Faryal's Cusine


Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...