Monday, 27 July 2020

Customization Analysis Report (CAR Report)- D365 through - xppbp.exe

The CAR Customization Analysis Report is a Microsoft Excel report.This report contains details of your customizations & artifacts, extension models, best practices issues, errors & warnings.

xppbp.exe: The use is very simple via an executable named xppbp.exe that is located either in C:\Packages\Bin\ (locally deployed VM) or I:\AosService\PackagesLocalDirectory\bin (Azure-deployed VM).

Syntax

The syntax is as follows

xppbp.exe -metadata="LocalPackagesFolder" -all -model="ModelName" -xmlLog="LogLocation" -module="PackageName" -car="ReportLocation"

You run it via command prompt (cmd.exe).

Examples

Be aware you need to execute this per model you have in your solution. For a model ApplicationSuite.XLTY you included in ApplicationSuite the call could look like this

xppbp.exe -metadata=C:\Packages -all -model="ApplicationSuite.XLTY" -xmlLog=C:\Temp\BPCheckLog_XltySuite.xml -module="ApplicationSuite" -car=C:\Temp\CustomizationAnalysisReport_XltySuite.xlsx

Assuming there is a model in Foundation, too, you would want to execute

xppbp.exe -metadata=C:\Packages -all -model="ApplicationFoundation.XLTY" -xmlLog=C:\Temp\BPCheckLog_XltyFoundation.xml -module="ApplicationFoundation" -car=C:\Temp\CustomizationAnalysisReport_XltyFoundation.xlsx

Report

The outcome of the analysis is a Microsoft Excel file that is quite similar to what you are used to from AX 2012.
AX7 Customization Analysis Report

Saturday, 4 July 2020

Get InventSite Address from InventSite ID in AX 2012

Primary address stored for inventSite 




The following job takes inventsiteID and returns the delivery address specified in the invent site. Hope it will help someone.

static void addressTest(Args _args)
{
    InventSite site = InventSite::find("S02");
    LogisticsPostalAddress address = LogisticsLocationEntity::findPostalAddress(site, LogisticsLocationRoleType::None);
    info(address.Address);
}


Phone Details

private Phone getSitePhone(InventSiteId _inventSiteID)
{
    InventSite site = InventSite::find(_inventsiteID);
    LogisticsElectronicAddress  logisticsElectronicAddress;
    LogisticsLocationEntity locationEntity = LogisticsLocationEntity::findLocation(site, LogisticsLocationRoleType::Delivery, DirUtility::getCurrentDateTime(),true);
    RecId parentRecID= locationEntity.parmLocationRecId();
   LogisticsLocation           logisticsLocation;
   if (parentRecID )
   {
      select logisticsLocation
           where  logisticsLocation.ParentLocation == parentRecID
           join logisticsElectronicAddress
               where logisticsElectronicAddress.Type     == LogisticsElectronicAddressMethodType::Phone &&
                   logisticsElectronicAddress.location == logisticsLocation.RecId;
   }
   return logisticsElectronicAddress.Locator;
}

POSTMAN D365

  Postman is useful to test the behavior of different OData class from/to D365FO. In this post we will see the steps to setup Postman with D...