Tuesday, May 12, 2020

Get SQL name of Temp table Dynamics 365

Using code below in runnable class we can find temporary table name, which is created in SQL tempDB.


// Declare a TempDB table buffer
TmpCustName tCustName;
   
// Insert data to create the table in TempDB database in SQL
tCustName.AccountName = '10001';
tCustName.insert();
   
// Display the name

info(tCustName.getPhysicalTableName());


Dynamics 365 Trace parser does not work

While collecting and monitoring trace, we were getting error as below:

Error:
The ETW Providers  “Microsoft-AX-XPPExecutionTraces” and “Microsoft-Dynamics-AX-ExecutionTraces” aren't installed in the VM

Issue:
Below mentioned providers were not enabled.
Microsoft-Dynamics-AX-XppExecutionTraces : Used to capture X++ methods events.
Microsoft-Dynamics-AX-ExecutionTraces : Used to capture SQL events.

Solution:

Execute command below to enable both events.

$resourcefiledir = "C:\AOSService\webroot"
$inputmanfile = "C:\AOSService\webroot\Monitoring\DynamicsAXExecutionTraces.man"
$outputmanfile = "C:\AOSService\webroot\Monitoring\DynamicsAXExecutionTraces_copy.man"
$temp = Get-Content $inputmanfile
$temp = $temp -replace "%APPROOT%",$resourcefiledir
$temp | out-file $outputmanfile
wevtutil im $outputmanfile
$inputmanfile = "C:\AOSService\webroot\Monitoring\DynamicsAXXppExecutionTraces.man"
$outputmanfile = "C:\AOSService\webroot\Monitoring\DynamicsAXXppExecutionTraces_copy.man"
$temp = Get-Content $inputmanfile
$temp = $temp -replace "%APPROOT%",$resourcefiledir
$temp | out-file $outputmanfile
wevtutil im $outputmanfile

Happening

Upgrade from AX 2012 to Latest Dynamics 365 Finance and Operation

Below are the steps defined by sequence. 1. Create new Upgrade project in Dynamics LCS. 2. Create VSTS Project and connect it with L...

Trending now