Renaming a OneBox Dev environment

Hi

Tonight I helped one of my developer colleagues who had issues with one of his DEV environments. The issue was that he had renamed the VM (you cannot have multiple machines in Azure DevOps with the same name). The problem was that he had not completed all the steps that is required to rename so it was behaving a bit weird.

First of all we were not able to connect to Reporting Services Configuration Manager. The solution was unfortunately not very logical… In the onebox environment there is a couple of SQL components installed from different SQL Server Versions:

If you use the wrong SSRS Configuration Manager it is not able to connect to the SSRS Server and get the error message: No report servers were found

The correct version is 2016! Completely logical… NOT!

When this was done we just followed this guide to complete the rename and all is well 🙂

/Johan

Links:
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/migration-upgrade/vso-machine-renaming
http://www.alexondax.com/2017/05/what-i-do-to-rename-d365-virtual.html
https://community.dynamics.com/365/financeandoperations/f/765/t/269137

Microsoft Dynamics 365 Unified Operations: Batch Management Service (DynamicsAxBatch)

When running the DataUpgrade Package in D365FO it stopped at step 7 with this error message:

‘Microsoft Dynamics 365 Unified Operations: Batch Management Service (DynamicsAxBatch)’

Looking in the Event Viewer Application Log I found this:

AX is shutting down due to an error. Microsoft.Dynamics.AX.Batch.BatchService+MaintenanceModeBatchStartupException: Exception of type ‘Microsoft.Dynamics.AX.Batch.BatchService+MaintenanceModeBatchStartupException’ was thrown. at Microsoft.Dynamics.AX.Batch.BatchService.OnStart(String[] args) Exception details: Microsoft.Dynamics.AX.Batch.BatchService+MaintenanceModeBatchStartupException: Exception of type ‘Microsoft.Dynamics.AX.Batch.BatchService+MaintenanceModeBatchStartupException’ was thrown. at Microsoft.Dynamics.AX.Batch.BatchService.OnStart(String[] args)

Apparently the issue was that someone had put the environment in Maintenance Mode. Here is a description on how to enable/disable maintenance mode

/Johan

Adding users WITHOUT an Azure AD Accounts to Dynamics 365 for Finance and Operations

Normally when using Dynamics 365 for Finance and Operations all you users are part of an Azure AD. This is created when ordering your license and is used for authentication. This AD is either stand-alone or synced with you OnPrem AD.

There might be situations where you need to add external users to your Dynamics installation and if these are part of an Azure AD you just use this guide but if the external part does not have Azure AD then it is a bit more problematic… You do not want to add them to your organization since this might add security issues and sometimes licensing costs, and you might not be able to force them to get their own Azure AD tenant.

There is however another way to do this. It will require the user to get a Microsoft Account, that should not be an issue since it is a free account.

  1. Log into the azure portal and go to Azure AD – All Users
  2. Click New Guest User
  3. Add the users Microsoft account (eg *@hotmail.com, *@outlook.com)
  4. Go to D365FO and choose Import users
  5. Select the new account, import it and give it the correct user role.

Now the user can log in using their hotmail adress

That’s all for today

/Johan

Force running distribution jobs in Dynamics 365 for Operations Retail

When working with retain in Dynamics 365 for Finance and Operations, distribution jobs are used for moving data between Channel Database and the “AX” transaction database.

The jobs with the prefix P are inbound to AX and the other once are for outgoing sync. In some cases we need to trigger these jobs manually. To do this go to Retail IT – Distribution Schedule. Select the job and click Run Now

When the job is run click the History button to verify that it ran OK.

/Johan

 

Call to TTSCOMMIT without first calling TTSBEGIN when installing a Deployable package

I just got an issue when running the DataUpgrade package to 8.1 form the command prompt in a Cloud hosted environment. The package failed on Step 6 with this error:

Application configuration sync failed. Microsoft.Dynamics.AX.Framework.Database.TableSyncException: Custom action sync failed with error: ‘InfoException:Stack trace: Call to TTSCOMMIT without first calling TTSBEGIN.

… followed by a huge stack trace… and since I am not fluent in stack trace I did what everyone does… I call a friend 😉

Fortunately I have great colleagues and I got the instant tip to restart IIS on the server; so I did and I reran the runbook :

AXUpdateInstaller.exe execute -runbookid=[yourrunbookid] -rerunstep=6

Presto… it worked…

/Johan

Editing an runbook that fails

Today I had an issue with installing a deployable package from the sommand prompt. When the runbook tried to stop the Retail Server i got the following error on step 1:

System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

I then saw that it was using the server name, and I thought that it might work using locka host instead… the only problem was that I had imported the runbook and it had failed… how am I supposd to fix this?

I found my runbook file in the folder where I had extracted the package. I opened it in Notepad and ran search and replace on the file. I saved the file and tried to import it again using:

AXUpdateInstaller.exe import -runbookfile=”[runbookfilename]”

and then I restarted the package install using:

AXUpdateInstaller.exe execute -runbookid=[runbookid] -rerunstep=1

Wohoo… it worked!!!

Remember: If you are running AXUpdateInstaller from powershell you need to add .\ before the command

/Johan

Configuring a LCS Repository for Electronic Reporting in Dynamics 365 for Finance and Operations

In Dynamics 365 for Finance and Operations, Microsoft provides a large repository for Electronic Reports. These cover a lot of scenarios but for those scenarios that requires custom reports you can use LCS to store these in order to share them between environments.

This requires a configuration in D365

First you need to add a configuration provider:

  1. In D365FO search for “Electronic Reporting”
  2. In the right click Configuration Providers

  3. Click New, Give it a Name and a URL and click save
  4. Back in the GER Workspace select the new provider and click Repositories

  5. On the Configuration repositories screen click Add – LCS and Create Repository. Select the correct LCS project and click OK.


    Note: Sometimes you need to make a connection to LCS. To do that click “Click here to connect to LifeCycle Services”. This is done in a separate tab. When it is done switch back to the previous tab and click OK. If you get an error, try again.

  6. To look at the reports in the repository, select it and click Open. You will see the reports stored in the LCS repository.

  7. You are also able to see them directly in LCS, in the Asset Library. If you are working as a consultant this report can then be saved to your personal Asset Library and shared with your colleagues

  8. To give your organization access to your custom report, go to the Shared Asset Library, select it and click Publish

Resetting the DataMart in Financial Reporting for Dynamics 365 for Finance and Operations

There is a universal solution for most problems in Financial Reporting (used to be Management Reporter) and that is to reset the DataMart. The DataMart is an internal data warehouse for Financial Reporting and when something goes wrong it is usually because of bad data in the DataMart. Another reason for resetting it when you do a refresh of the transaction database in D365/AX. Here is how you do it.

  1. In D365 search for “Financial Reports”
  2. Depending on if you see reports or not either select a report and click edit or click new. This will open the Report Designer. Note that you will need to enable pop-ups. Also note that if you are doing this in Chrome you will need an extension called ClickOnce in order to run the designer.
  3. You will need to log in using your Dynamics Account.
  4. Choose a default company /which does not really matter for this operation)
  5. If there are any open report definition close it

  6. Go to Tools – Reset Data Mart…
  7. Check Reset data mart and select the correct reason for the reset

  8. Click OK

    The Data Mart is now reset and filled with fresh data.

  9. Wait for the reset to finish

  10. When all lines have Status RanToCompletion the reset is done.

Setting a Dynamic 365 for Operations cloud hosted environment in Maintenance mode

Some configurations in Dynamics requires you to be in Maintenance Mode. Some of these are:

  • Activating dimensions
  • Changing license keys

The limitations of maintenance mode is that you will need to be Admin or maintenance mode user to log in.

  1. Log into the VM using RDP
  2. Start an elevated command prompt
  3. Go to K:\AosService\PackagesLocalDirectory\Bin\ (in this case K is the service volume)
  4. För följande:
    Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir K:\AosService\PackagesLocalDirectory --bindir K:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser  --sqlpwd [sqlpassword] --setupmode maintenancemode --isinmaintenancemode true
  5. Run IISRESET

To set it back run this

Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir K:\AosService\PackagesLocalDirectory --bindir K:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser  --sqlpwd [sqlpassword] --setupmode maintenancemode --isinmaintenancemode false

and then IISRESET

NOTE: Maintenance mode of a Production environment is set by a service request to DSE.

NOTE: On Sandbox Environments, do the above procedure on one of the AOSes. You might need to run IISreset on all AOSes.

Links:
https://community.dynamics.com/365/financeandoperations/b/ax2012codingaxclated/archive/2018/06/22/d365fo-maintenance-mode-importing-license-file-isv-var-add-on-license-import
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/sysadmin/maintenance-mode

Uninstalling Excel Addin

This one was an annoying one…

I had to help a customer uninstall the Excel addin for Dynamics 365 for Operations. This should be a simple task (everything is if you know how to do it). So I went into Excel Add-ins using File – Options – Add-Ins… No Dynamics Excel addin:

WFT!!! A nice person then showed me that there is another place for Excel Addins (obviously)… You go to Insert – My Add-ins… Presto!

/Johan