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" -setupmode "sync" -syncmode "fullall" -isazuresql "false" -sqlpwd "password"

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!



Friday, December 15, 2017

Use the same ADFS Server for multiple On Premises Environment - Dynamics 365 for Finance & Operations On Premises Installation

Hi All

According to the Microsoft documentation you should have an ADFS Server for each On Premise Environment.

As per my understanding, the reason is related to the workflowClientId that is an hard coded value in  the \Publish-ADFSApplicationGroup.ps1 Powershell script.
Check my post as well.

Due to this reason, in order to use the same ADFS Server you have to add a new Host in the Application definition of the ADFS:

  1. AD FS Manager > AD FS > Application Groups > open "Microsoft Dynamics 365 for Operations On-premises" 
  2. Open Native application "Microsoft Dynamics 365 for Operations On-premises - Native application" 
  3. Add Redirect URI of new environment (DNS) and select Add button to include > OK 
  4. Open Native application "Microsoft Dynamics 365 for Operations On-premises - Financial Reporting - Native application" 
  5. Add Redirect URI of new environment (DNS) and select Add button to include > OK














































Till Soon!