Posts

Showing posts from January, 2024

D365FO - X++ - Generate CAR (Customized Analysis Report) report of custom model

Image
1- Open command prompt by clicking on "Run as Administrator". 2- Select the drive where your model and package exist in command prompt. My custom model is in K: folder. W rite the following command.   3- Copy the following command and run. K:\AosService\PackagesLocalDirectory\bin\xppbp.exe -metadata=K:\AosService\PackagesLocalDirectory -all -model=yourModel -xmlLog=K:\BPCheckLogcd.xml -module=yourModel -car=K:\CARReport 4- After successful completion, the CAR report will be saved to the given path

D365F&O - X++ - Set contract parameter value in controller class of SysOperationServiceBase framework

/// <summary> /// A class entry point /// </summary> /// <param name = "_args">An instance of <c>Args</c> which /// contains calling arguments</param> public static void main(Args _args) {     str caption;     ItemExportController   controller;     controller = ItemExportController::construct(); // get data contract object     ItemExportContract contract = controller.getDataContractObject();      // set data parameter value     contract.parmitemExportSystem(_args.parmEnum());             controller.parmArgs(_args);     controller.startOperation(); }

D365F&O - X++ - Add query in batch job for filtering records.

 Add the following code in Contract class. /// <summary> /// Contract class for <c>ItemExportBatch</c> class /// </summary> [DataContractAttribute] class ItemExportContract {     ConfigId ConfigId;     str packedQuery;     /// <summary>     /// Config Id parameter     /// </summary>     /// <param name = "_ConfigId">ConfigId</param>     /// <returns>Config Id</returns>     [DataMember,     SysOperationLabel(literalStr( "@SYS2653" ))]     public ConfigId parmConfigId(ConfigId _ConfigId = ConfigId)     {         ConfigId = _ConfigId;         return ConfigId;     }     /// <summary>     /// query parameter     /// </summary>     /// <param name = "_packedQuery">packedQuery</param>     /// <r...