Mobile Workspaces in Dynamics 365 for Operations

Was looking today for a way to test mobile workspaces in Dynamics 365 for Operations (still no good abreviation). This is a bit hidden.

To be able to create a mobile workspace you log into D365O. Once you have logged in you, goto the address bar in your browser and add &mode=mobile to the end of the address and press enter.

Go to the module where you want to create the mobile workspace and click the settings wheel in the top right corner and a new menu item is visible

image

Click mobile App menu item and then click + Add

image

In my example I am in the Project module. I click Add to create a mobile app

image

I click + Add Page and give it a name and a description and click Done

image

Click + Select Fields to add which fields to view. You add fields by clicking on the plus on each column and click Done when you are ready.

image

Click Done and Publish workspace to finish the Mobile Workspace.

To test your Mobile workspace, install the Microsoft Dynamics 365 app from Google Play Store eller från Apple App Store, add the URL to your Dynamics 365 for Operations tenant, log on with your Azure Active Directory account and test your workspace

Screenshot_2017-01-17-21-37-00 (002)

/Johan

Links:
https://ax.help.dynamics.com/en/wiki/mobile-development-handbook/
https://sandeepchaudhury.wordpress.com/2016/09/30/sneak-peek-into-mobile-applications-framework-for-dynamics-axdynamics-365-enterprise-edition/

Error when syncing DataMart – Invalid column name ‘PARTITION’. Invalid column name ‘Key_’.

Todays issue is a problem with integrating Management Reporter CU 15 with AX 2012 R3. When doing the initial integration we got this error:

Invalid column name ‘PARTITION’.
Invalid column name ‘Key_’.

and the integration never finished. After doing some research online I found someone with this issue and the recommendation was to downgrade to Management Reporter CU13. When doing so we bumped into an error in CU 13 causing deadlocks in SQL. I called Microsoft support and got the recommendation to once again upgrade to CU15.

Here is a good place to insert some history:

The customer upgraded from AX 2012 Feature Pack directly to AX 2012 R3. Before upgrading from AX 2012 Feature Release to AX 2012 R3 we had installed MR CU13. In AX 2012 R2 Microsoft introduced a feature called PARTITION. This is used to be able to host AX in a multi tenant environment with isolated customers.

When installing Management Reporter (CU13 and Later) and integrating it to AX it creates three views in the database.

image

When we upgraded directly from AX 2012 Feature Release directly to AX 2012 R3 these views where migrated to R3 and when we installed CU15 these views were never updated (the PARTITION column was missing), Management Reporter just verified that they were there and thought all was fine.

  1. Resolution:
    Remove the integration
  2. Remove the three views
  3. Recreate the integration
  4. Enable the integration and sync the datamart

That is all for today

/Johan

Configure PowerBI for Dynamics 365 for operations

Today I helped two of my colleagues setting integrating Power BI for Dynamics 365 for operations. There are a couple of guides online which I have used to create this post, but I thought I would create one from my experience.

There are a couple of main steps we need to go through:

Create a Azure AD Application
Configure Dynamics 365 for operations for Power BI
Configure Power BI
Configure your workspace

Create a Azure AD Application

There are two ways of doing this… you can do it using the Power BI Developer registration tool or you can do it directly from the Azure Portal. We did it from the Azure Portal like this:

  1. Log into the Azure potal… You can use both the old and the new one
  2. Goto Azure Aztive Directory and select your Azure Active Directory Instance
  3. Go to Applications/App Registrations
  4. Create a new application with these settings:
    1. Name: ChooseYourName
    2. Application Type: Web app/API
    3. Sign-on URL: https://theadressforyourdynamics365foroperationsinstance/oauth
    4. App ID URI: https://theadressforyourdynamics365foroperationsinstance  Anything EXEPT https://theadressforyourdynamics365foroperationsinstance . You can for instance use https://DynamicsBI, it only has to be unique for each Azure AD Application
      Edited 27/1 2017
    5. Reply URL: https://theadressforyourdynamics365foroperationsinstance/oauth
  5. When this is created you will get a Client ID/Application ID and you will create a key. You need to save these because you will need the later. Note that the keys are only visible when they are created, Once you leave the page and go back you cannot see them again. If this happens and you have not saved it you can simply create an new one.

    Old portal
    SNAGHTML221ce22

    New Portal:
    SNAGHTML22b2d3e

  6. Once you have set up the application in Azure ID you will need to give it some permissions. This is where we got stuck because in one of the guides there was a screenshot which showed to few permissions and it simply did not work. You add the application Power BI Services and give it the correct permissions. We used the following permissions:
    1. View User Groups
    2. View all Groups
    3. View All Reports
    4. View content Properties
    5. Read and Write all datasets
    6. View All Datasets
    7. View All Dashboards

      SNAGHTML23c8166

Configure Dynamics 365 for operations for Power BI

  1. In Dynamics 365 for Operations, go to System Adminstration – Power BI
  2. You need to Enable the configuration and then you change these values
    1. Azure AD Tennant (this you will find in the Azure Portal)
    2. Client ID (you saved it above)
    3. Application key(you saved it above)
    4. Redirect URL: ps://theadressforyourdynamics365foroperationsinstance/oauth (This one is incorrect and will not work… ever… I do not understand how there can be an incorrect default value)

      The other values are correct

Configure Power Bi

  1. Every user that is going to use Power BI (more or less every user that is usign AX) will need at least a Power BI free License. As the name implies it is actually free and you addit in the Office 365 Admin Portal. Once you have added the wou will have to do this for every user:
  2. Log into Power BI (https://powerbi.microsoft.com)
  3. Click Get Data in the lower left corner
  4. Click Services – Get

    image

  5. Click Get it now on each of  the three (for now) AX Apps

    image

  6. On each of the Apps enter the URL for your AX instance (https://theadressforyourdynamics365foroperationsinstance ) and flick next. If you get prompted for authetication select OAuth2

    image   image

Configure your workspace

  1. Log into Dynamics 365 for operations
  2. Go to the Workspace called Cost Administration
  3. Scroll to the right and click on the Power BI pane

    image

  4. If this is your first time you need to authorize Power BI. Click the link, log in using your credentials and approve the permissions.

    image   image

  5. Return to the Dynamics Tab and click close

    image

  6. Select the Power BI tiles you want from the Tile catalog and click OK to add them to your workspace

    image    image

This should be it… Business Intelligence glory!

Links:
https://ax.help.dynamics.com/en/wiki/configuring-powerbi-integration/

Using IFTTT to create a blog post draft in WordPress Blog

I am always trying to create a workflow and automation around things in image
my life and I am also trying to develop an efficient way of working.

One of the things I have started doing is keeping the things I should do in my ToDo list. I am currently using Todoist as my todolist and it is a great and flexible tool. One of the things I rwally like is that I can connect it to a service online called IFTTT which is a workflow engine. IFTTT stands for If This Then That and here you can create rules which says that if this happens than do that. So how does this play in to blog posts.

Well, there is as I said a channel/applet in IFTTT for Todoist and there is also one for WordPress which is my blog engine. When i connect them it look lie this:

If i create a todolist item in the project called “Blogpost to write”, create a new blog post draft with the title of the task.

image

This way there is a stub post waiting for mewith the correct title in my drafts folder. Here I can for instance past links I want to be in the post and then when I have the time i just go in and complete it… and ofcource check the item in Todoist

Updating a secondary AOS instance

Today one of my colleuges had an issue with applying a hotfix in a customers environment. The environment had three AOS instances installed on the same server which had the correct version and they installed a fourth one which they missed to patch.

When we ran the axupdate install file we got this screen:

image

It said that there is nothing to patch… which there was… weird. So looking around the internet I found out that there is a command line parameters for axupdate called AOSINSTANCENAME… great… that should work…

image

Doh… turns out you cannot use comandline parameters unless you run a completely silent install…

axupdate.exe AcceptLicenseTerms=1 AosInstanceName=04-AX183ByggUserTest AosStart=0 HideUI=1 InstallAos=1 LogDir=”c:\Temp”

If you miss the HideUI=1 it will also ignore all of the other parameters Sad smile

Well… all well that ends well

Merry Xmas

/Johan

Problems with Event viewer messages for AX

Quite ofter when I look in the eventviewer I can see issues that the Event ID text does tell me anything other than it is not possible to show the message. I got this today at a customers that is running AX so I descided to find the solution. The error message I got looked like this:

SNAGHTMLa609812

I searched around a bit and found a solutin online… turns out we need to create a registry key pointing to the correct file containing the event text. This could be a exe or a dll file.

Below is a link to the information and the entire solution. The short description is this:

  1. Open regedit and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application
  2. Create a new key called Microsoft Dynamics AX
  3. Create a String Value called EventMessageFile and add the following text:
    C:\Program Files (x86)\Microsoft Dynamics AX\60\\Client\Bin\Ax32.exe

Best Regards

/Johan

Link:

https://stoneridgesoftware.com/ax-event-log-message-the-description-for-event-id-from-source-microsoft-dynamics-ax-cannot-be-found/

Issues with LCS System Diagnostics

I am working with a customer today and we are setting up LCS System Diagnostics on their AX 2012 R3 environment. They have quite a locked down environment which presents some challenges.

First of all we need to open outgoing traffic to LCS and to Azure from the server where we installed LCS according to Microsoft. The adresses are:

Azure: 168.62.1.142:443
LCS: 137.135.11.111:443

If you miss the Azure port no data vill be uploades since the upload is a Zipped file to an Azure Storage account

Johan

Can not create default Keyset when using AXBuild

We have a large deploy with a customer this week which is a very bad time for AXBuild to stop working… really bad time. And ofcourse that is what happened Smile (screw you Murphy). There are of course other ways to to a compile in AX byt doing it from within AX is really slow so AXBuild is much nicer and faster.

The problem was that when I launched AXBuild the process kept crashing with this error:

clip_image002

I also got the following events in Event viewer:

Error 14.11.2016 17:49:05 Dynamics Server 01 110 None
Object Server 01:
Can not create default Keyset. Error code -2146893809.

Error 14.11.2016 17:49:05 Dynamics Server 01 110 None
Object Server 01:
The license information can not be decoded.

Error 14.11.2016 17:49:06 .NET Runtime 1026 None
Application: Ax32Serv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception
Exception Info: System.Runtime.InteropServices.SEHException
Stack:
at <Module>.wmainCRTStartup()
at <Module>.wmainCRTStartup()

When doing research we found that this is most likely a permissions issue and I got somen hints on what to check:

  • Are you running elevated: Check
  • Are you local admin on the AOS computer: Check
  • Is the AOS user local admin on the AOS computer: Check
  • Check AOS user permissions on the AX database and modelstore: Check

I was not able to find the solution so I resorted to Microsoft Support and they sait the same thing… it is a permission issue. So finally I fired up ProcessMonitor (which I don’t do often enough) and the it was after some looking around and filtering. I filtered out everything except the Ax32Serv.exe process and I also removed the SUCCESS lines.

The issue was that my user (the one doing the the compiling) got access denied on a file in the folder:

C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys

I changed the permission on the file and Presto! (or as one of my colleugues said – I am going to get a Cappuchino with cinnamon)

The compile is running and things are good

/Johan

CREATE TABLE permission denied in database ‘tempdb’

This morning we had an incident with a customer who during the night had failed over their SQL cluster during the night and then failed it back again and now AX had stopped working. The error was this:

image

The problem is that when SQL is restarted the permission on tempdb is reset. AX solves this is a “special” way. When AX is installed the install created a stored procedure in master on the SQL server which it calls to set the permissions in case they get lost.

2016-11-10_09-15-41

These was unfortunately missing on one of the nodes so I used Management Studio to script them out and the create them on the node where they were missing

/Johan

Problems using Excel Workbook Creator in AX “7”

We have started working with some customers who are looking into implementing The New Dynamics AX (aka AX 7) and one of the very useful features in AX are integration with the Microsoft Office. This has historically been done using an Office Addin which has been installed from the AX Install CD (of deployed by IT). In the new AX version this is done a little differently. You need to install a plugin from the Office Store (which I talk about here).

The other day one of my colleagues came to me and told me that it did work to use the Excel workbook creator… the login failed Sad smile. The login started, the user was redirected to our ADFS site and it was visible for a moment and then it was redirected to a blank place with the address: https://az689774.vo.msecnd.net/dynamicsofficeapp/v1.2.1.0/App/DynamicsApp.html#id_token

SNAGHTMLdc73d34

This is an issue with Office and how Office handles ADFS logins according to this article. According to Microsoft this has been fixed in the 16.0.6868.2060  build of Office 2016. This build is at the moment (2016-05-20) only available for Office Insiders which means that if you are using Office 365 your admin needs to enable you for Current Channel and you need to reinstall Office. 

Links:

https://ax.help.dynamics.com/en/wiki/office-integration-troubleshooting/