Thursday, December 27, 2018

Trace Parser doesn't work - Dynamics 365 for Finance & Operations

Hi All and Happy Christmas!!

Below, I'll share an issue that wasted my time during an Performance investigation.
I have to say also thanks to Microsoft Technical support for helping me.

Some ETL files opened with Trace Parser on a onebox VM, didn't show up any methods and any queries. Something like that:













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

Microsoft-Dynamics-AX-XppExecutionTraces : Used to capture X++ methods events.
Microsoft-Dynamics-AX-ExecutionTraces : Used to capture SQL events.


















Resolution : In that case you can install the missing providers with the following steps:

Find the location of the manifest files. If you are using a onebox VM they are in C:\AOSService\webroot\Monitoring

Open a Powershell as Administrator and run the following commands to install the 2 missing event providers:

$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

Close and open Trace Parser again and verify the providers are visible in the list.

Another way is to:

Copy c:\Monitoring folder from a 7.2 working VM

Run MonitoringInstall.cmd from Command Prompt running as Administrator in this folder

I guess with the new VM version this issue is gone!

Enjoy!

Thursday, December 6, 2018

Upcoming Dynamics 365 Events

Greetings,

around the Microsoft Dynamics 365 ecosystem, there a lot of Events organized in the world that sometime is not easy to catch out!

Thank you to @Andrè and @Vilmos that helped me to discover them!
Therefore, below a list of upcoming events:

  1. Microsoft IGNITE Tour
    • Learn new ways to code, optimize your cloud infrastructure, and modernize your organization with deep technical training
  2. AXUG Summit EMEA - 27-29 March 2019 | RAI Amsterdam
  3. Dynamics 365 Saturdays
    • Dynamics 365 Saturday is a free Technical & Strategy Event Organised by the Microsoft Dynamics Community MVP’s For CRM and ERP professionals, technical consultants & developers. Learn & share new skills whilst promoting best practices, helping organisations overcome the challenges of implementing a successful digital transformation strategy with Microsoft Dynamics 365.
  4. Microsoft Business Applications Summit - June 10-11, 2019 Georgia World Congress Center | Atlanta, GA
    • All things Dynamics 365, Power BI, Excel, PowerApps, and Microsoft Flow under one roof. Meet the engineers behind your favorite tools, hang out with like-minded explorers, and get hands-on with immersive breakout sessions and workshops.
  5. Business Applications Partner Events
  6. Microsoft Dynamics 365 Community Events
  7. AXUG Local Chapters
    • Connecting great ideas and great people through education and networking in a local setting.
  8. D365 Global Calendar
Stay Tuned!




Sunday, November 25, 2018

How to handle a new TAG in the ISO20022 bank statements - Dynamics 365 for Finance & Operations

Hi All,

In Microsoft Dynamics 365 for Finance and Operations, against the Advanced bank reconciliation Module, we can import electronic bank statements and automatically reconcile them.

The article below will explain the set up processes for reconciliation.

Advanced bank reconciliation setup process

Days ago I spent some time in order to handle a new XML Tag.

The link below explain the basic setup. The Bank Statement import varies, depending on the format of your electronic bank statement. F&O supports three bank statement formats out of the box: ISO20022, MT940, and BAI2.
Set up the advanced bank reconciliation import process

So, for instance if you have to handle a new Column/Tag into the Bank Statement Lines table (BankStmtISOReportEntry),  you have to:

  1. Add the new field to the BankStmtISOReportEntry table
  2. Add the same field to the BankStatementLineStaging table and BankStatementLineEntity Data Entity
  3. Edit the SampleBankCompositeEntity.xml file and Add the new Tag according the new Field added to the Step 1 and related the specific Section/Table
  4. Edit the BankReconiliation-to-Composite.xslt trasformation file and add the new Tag. In my case I searched for another "similar" tag for the same Entity and I replicate all found entries and change the name
  5. Edit the ISO20022XML-to-Reconciliation.xslt trasformation file, found the  entry and Add the new Tag Section. Also in that case I have copied another "similar" section and change the name
  6. Go through the Entity and regenerate the Mapping
  7. Lastly, in F&O recreate the Entity in the Data Management Processing Group and follow the steps mentioned in the Setup link above
  8. Test the file Import
Take a look also to the link below in order to, for instance, Debug an XSLT file.

That's it!

Sunday, September 23, 2018

How to suspend RecId Sequence - Dynamics 365 for Finance & Operations

Hi,

as you know in D365FO now the sequences are handled by SQL and not anymore from the SYSTEMSEQUENCES table.

From particular scenarios could be necessary to suspend the Recid assignement.
In order to do that, issue the following command:

appl.sysRecIdSequence().suspendRecIds(tableNum(TABLENAME));

Tale a look also to the standard AccountingDistributionProcessor class, SuspenAccDistRecidAssignment method.

Till soon!

Sunday, September 16, 2018

How to avoid Retail Module configuration reset - Dynamics 365 for Finance & Operations LBD

Hi mates,

if in your LBD implementation the Retail Module disappear after a Deployment, here how to avoid it.

After a chat with Microsoft, to prevent DB sync from resetting the config keys (Retail in my case), issue the following command against the AxDB Database from sql server management studio:

INSERT INTO SQLSYSTEMVARIABLES (PARM, VALUE, IPARM, IVALUE) VALUES ('FirstSyncSuccess', 1, 20, NULL)

It seems that in the next months a new KB will be release in order to fix that.

In the next Deployments you can sleep peacefully that the Retail Module will be there again!

Till soon!

Tuesday, July 24, 2018

Maintenance mode - Dynamics 365 for Finance & Operations LBD

Hi All,

In order to turning maintenance mode on or off in an Dynamics 365 FO LBD (aka On-premise) implementation, you have to:

  1. Open Sql Server Management Studio
  2. Point to the AXDB database
  3. Raise the following command, update SQLSYSTEMVARIABLES SET VALUE = 1 where PARM = 'CONFIGURATIONMODE'
  4. Restart the Service Fabric service against all AOSs Node
  5. When you've completed your maintenance mode activities, repeat steps 3 and 4 but set the value to 0 in step 3.
This is a mandatory step if you have to change the License configuration entries.


More details at Maintenance mode

Till soon!

Sunday, May 6, 2018

Fast Deployment - Dynamics 365 for Finance & Operations LBD

Greetings!

On a Dynamics 365 for Finance & Operations LBD Deployment, can occur that the Deployment fails on a certain step like the SSRS App Deployment, Synch, etc.

In order to check the Deployment status and the running task, you can run the below query against the «OrchestratorData» Database.

use OrchestratorData
select * from RunBookTask order by StartDateTime desc



In such case, just fixed the issue we can restart the Deployment in two ways:
  1. Through LCS, retry button (like cloud)
    • this option clear all Fabric applications and recreate them again. Time consuming
  2. Through SQL Server, fast way
    • this option avoid to recreate the Applications and rerun the last step only

About the second option, once checked the failed step with the previous query, we have to update the two tables involved in the process and move the State field from 3 to 1 for the specific JobId.

update OrchestratorJob set State = 1 where JobId = 'AXUG-028b0c39-e713-4fb9-b375-52f507df1313'

update RunBookTask set State = 1, Retries = 1 where RunbookTaskId = 'AXUG-028b0c39-e713-4fb9-b375-52f507df1313-setupModules'

About this option, take care because in some cases like Certificates update, recreation of the Credentials.json file, etc. is mandatory handle the deployment through LCS.

About that, I handled a session to the last AXUG Conference in Dublin.

Till soon!

Violation of PRIMARY KEY constraint 'I_65518FIELD' - Dynamics 365 for Finance & Operations LBD

Hi

Recently I had a Synch issue during my deployment on a Dynamics 365 FO LBD Implementation.

This is the error:

Violation of PRIMARY KEY constraint 'I_65518FIELD'. Cannot insert duplicate key in object 'dbo.SQLDICTIONARY'. The duplicate key value is (TABLEID, FIELDID, 1, 0).

It seems that already exist a field with the same FieldID!

With Microsoft Dynamics 365 FO I thought that issue like that doesn't happen anymore.

However, against the Business Database exist a table named TABLEFIELDIDTABLE that list for each table the fieldId values.

From my side I notice that some of my custom field ids present on that table was different than the Ids listed on the SqlDictionary table.

Really strange..

So, I decide to update the SQLDictionary table according with the Id values coming from the TABLEFIELDIDTABLE table.

Lastly, I restarted my deployment from the same failed step.
Take a look here in order to understand how to rerun a specific Step without to rerun the entire process.

The same issue could occur also on a Cloud Deployment, like on your Tier 1 or UAT Environment

That's it!

Sunday, April 22, 2018

Dynamics 365 for Finance & Operation LCS Abort option doesn't work

Hi All

If a package installation fail during a LCS Deployment we can choose Abort in order to stop the package application.

It could happen that this option fails as well.

From my side, I click on the button "Maintain\Restart services" and choose IIS as a service that must be restarted.

After a few seconds, I issued again the Abort option and now it completed successfully.

Here some useful links:

Restart environment services

Apply updates to a cloud environment

Till soon!


Monday, February 26, 2018

Synchronize the database manually - Dynamics 365 for Finance & Operations On Premises Installation

Hi All

Sometime in a D365FO On Premise deployment the Sync doesn't triggered!

What to do?

You can run the Database Sync manually as per the "Copy a Finance and Operations database from SQL Server to a production Azure SQL Database environment" procedure.

In an On Premise change a little bit.

The steps are:
  1. Connect to RDP to an AOS Node
  2. Open the PowerShell ISE
  3. Copy the script below and change the Bold part as per your environment
  4. In that case my package name is "K"

cd C:\ProgramData\SF\AOS_XX\Fabric\work\Applications\AXSFType_App164\AXSF.Code.1.0.0.20171212_K.zip.0\Packages\bin

.\Microsoft.Dynamics.AX.Deployment.Setup.exe -bindir "C:\ProgramData\SF\AOS_3\Fabric\work\Applications\AXSFType_App164\AXSF.Code.1.0.0.20171212_K.zip.0\Packages" -metadatadir "C:\ProgramData\SF\AOS_3\Fabric\work\Applications\AXSFType_App164\AXSF.Code.1.0.0.20171212_K.zip.0\Packages" -sqluser "axdbadmin" -sqlserver "FQDN SQL instance" -sqldatabase "axdb" -sqlpwd "password" -setupmode servicesync -syncmode fullall -onprem


Another way is to Delete the entry in SF.SyncLog related the last Deployment, and then restart one of the AOS machines. The AOS machine will rerun DB Sync and then deploy reports.
Check out the link https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/deployment/troubleshoot-on-prem#redeploy-ssrs-reports


Enjoy with D365FO On Premise!


Update: This behaviour is related to the sf.synclog tableThis table contain all packages installed on an Environment.
If we want to move an package with a name already used before, the Deployment process found it in that table and the Synch is skipped!
The workaround is to truncate the table or at least delete the record relative to the package.

Update 2: This issue is been fixed on Platform Update 12.

Tuesday, January 2, 2018

Deploy SSRS Reports Manually - Dynamics 365 for Finance & Operations On Premises Installation

Hi All and Happy 2018!!

In an D365FO On Premise Installation you can raise an issue where the SSRS Reports are not deployed.
From my understanding it should be a Bug that will be fixed soon.

However, you can deploy them manually following the below steps:

  1. Go to the SSRS nodes.
  2. Access to the C:\ProgramData\SF\Rep_xx\Fabric\work\Applications\ReportingService_Appxx\ReportingBootstrapperPkg.Code.x.x.x.xxxxxxxxxxx\Scripts folder
  3. Open PowerShell in Admin Mode. So Click on the File menĂ¹\Open Windows PowerShell\Open Windows PowerShell as Administrator
  4. .\DeployAllReportsToSSRS -PackageInstallLocation \\AOS1SERVERNAME\c$\ProgramData\SF\AOS_xx\Fabric\work\Applications\AXSFType_Appxxx\AXSF.Code.x.x.x.xxxxxxxxxxx.zip.0\Packages -ReportServerIp XX.XX.XX.XX
Till soon!