Error importing Electronic Reporting Configurations

Hi…

Today we are looking at an issue that one of my colleagues had. This is actually an Application issue but I am writing it up for future reference.

When we are importing Electronic Reporting configuration in Dynamics 365 for Operation we get the following error:

clip_image001

Since it is a bit intermittent and works for some configurations we have suspected a timeout… we were on the right track… When speaking to Microsoft Support we got the tip to change a parameter in the configuration for Electronic Reporting to allow more multiple parallel threads for loading data:

image

Go to Organization administration – Workspaces – Electronic reporting – Electronic Reporting parameters and change Number of parallel threads to load data to 15 (the default is 5)

BR

Johan

Error in Environment Reprovisioning tool

I have been working with an upgrade of Dynamics 365 for Operations now for a while and found an issue when it comes to Environment Reprovisioning tool, also known as Retail Retargeting Tool. This is a tool used to fix the retail conponents in an environment after you have done a database copy to the environment from another environment. We did this as part of the upgrade to Platfor Update 10.

When we ran the tool from the command prompt in the environemnt we gor the following error:

The step completed
Executing step: 3
GlobalUpdate script for service model: RetailServer on machine: localhost
Run RetargetRetailServer.ps1
RetargetRetailServer.ps1 failed.
The step failed
The step: 3 is in failed state, you can use rerunstep command to debug the step explicitly
at Microsoft.Dynamics.AX.AXUpdateInstallerBase.RunbookExecutor.executeRunbookStepList(RunbookData runbookData, List`1 runbookStepList, String updatePackageFilePath, Boolean silent, String stepID, ExecuteStepMode executeStepMode, Boolean versionCheck, Boolean restore, Parameters parameters)
at Microsoft.Dynamics.AX.AXUpdateInstallerBase.RunbookExecutor.executeRunbook(RunbookData runbookData, String updatePackageFilePath, Boolean silent, String stepID, ExecuteStepMode executeStepMode, Boolean versionCheck, Boolean restore, Parameters parameters)
at Microsoft.Dynamics.AX.AXUpdateInstallerBase.AXUpdateInstallerBase.execute(String runbookID, Boolean silent, String updatePackageFilePath, IRunbookExecutor runbookExecutor, Boolean versionCheck, Boolean restore)
at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.InstallUpdate(String[] args)
at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.Main(String[] args)

So this error was not that obvious to me… So I took a look at the loggs for the Deployable package which are located in the RunbookWorkingFolder (located in the folder where you extracted the package). There I found this:

Exception : System.Management.Automation.RuntimeException: The servicing data of this box has not been migrated yet, please rerun this tool with axlocaladmin
TargetObject : The servicing data of this box has not been migrated yet, please rerun this tool with axlocaladmin

This made me think… The older environments always had an account called axlocaladmin but the newer ones does not. After some digging around in the script called RetargetRetailServer.ps1 I found this (on line 302) :

if($env:UserName -ne ‘axlocaladmin’)
{
$errorMessage = “The servicing data of this box has not been migrated yet, please rerun this tool with axlocaladmin”
Log-TimedMessage $errorMessage
throw $errorMessage
}

I simply changed it to:

if($env:UserName -ne ‘adminXXXXXXXXXX’)
{
$errorMessage = “The servicing data of this box has not been migrated yet, please rerun this tool with axlocaladmin”
Log-TimedMessage $errorMessage
throw $errorMessage
}

where adminXXXXXXXXXX is the account name for my user and the i re-ran:

AXUpdateInstaller.exe execute -runbookid=env-reprovision -rerunstep=3

And presto… it worked 🙂

Note that this is the reprovisioning tool from 8/30/2017, I have not looked at any other verisons.

/Johan

Issues after Database copy

Yesterday we did a database refresh between two of our Non-Production OneBox environments an this morning I got an email. The users where having problem viewing invoices in All Sales Orders. The error they got looked like this:

“Something went wrong while generating the report. Please try again”

That was not extremely helpful so I started looking around and found information on how to get a detailed log:

1. Click on Environment monitoring.
2. Click on Raw logs
3. In the query name field, select “All events for activity”
4. Copy 78ca1c74-3c56-4f6b-8c18-a4034876780d in the activity ID
5. Click on shows options and set Row limit to 5000.
6. Click on search.
7. Scroll down towards the end to see exception message.

And that got me (not very useful):

at [aoskernel.dll]Microsoft.Dynamics.Ax.MSIL.Interop.GetManagedCallStack(basic_string<wchar_t\,std::char_traits\,std::allocator >* ) at [aoskernel.dll]Microsoft.Dynamics.Ax.Services.AOSAppDomainHelper.callGetManagedCallStack(basic_string<wchar_t\,std::char_traits\,std::allocator >* ) at callGetManagedCallStack(basic_string<wchar_t\,std::char_traits\,std::allocator >* ) at cqlClass.callEx(cqlClass* , Char* , interpret* ) at cqlClass.callEx(cqlClass* , Char* , interpret* ) at [aoskernel.dll]Microsoft.Dynamics.Ax.MSIL.cqlClassIL.Call(IntPtr c, String methodName, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes) at [Microsoft.Dynamics.AX.Server.Core.dll]Microsoft.Dynamics.Ax.Xpp.XppObjectBase.Call(String methodName, Object[] parameters, Type[] types, Object[] varargs) at [Microsoft.Dynamics.AX.Xpp.Support.dll]Dynamics.AX.Application.xInfo.add(Exception exception1, String text1, String text2) at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.`add(Exception _exception, String _txt, String _helpUrl, XppObjectBase _sysInfoAction, Boolean buildprefix, String _label, Boolean @_helpUrl_IsDefaultSet, Boolean @_sysInfoAction_IsDefaultSet, Boolean @buildprefix_IsDefaultSet, Boolean @_label_IsDefaultSet) in xppSource://Source/ApplicationPlatform\AxClass_Info.xpp:line 335 at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.InfoCoCHelper.`add(Info instance, Exception arg0, String arg1, String arg2, XppObjectBase arg3, Boolean arg4, String arg5, Boolean , Boolean , Boolean , Boolean ) at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.add(Exception _exception, String _txt, String _helpUrl, XppObjectBase _sysInfoAction, Boolean buildprefix, String _label, Boolean @_helpUrl_IsDefaultSet, Boolean @_sysInfoAction_IsDefaultSet, Boolean @buildprefix_IsDefaultSet, Boolean @_label_IsDefaultSet) at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.Info.add(Exception _exception, String _txt) at [Dynamics.AX.ApplicationFoundation.dll]Dynamics.AX.Application.SrsReportViewerControl.`displayErrorMessage(String message) in xppSource://Source/ApplicationFoundation\AxClass_SrsReportViewerControl.xpp:line 870 at [Dynamics.AX.ApplicationFoundation.dll]Dynamics.AX.Application.SrsReportViewerControl.SrsReportViewerControlCoCHelper.`displayErrorMessage(SrsReportViewerControl instance, String arg0) at [Dynamics.AX.ApplicationFoundation.dll]Dynamics.AX.Application.SrsReportViewerControl.displayErrorMessage(String message) at SrsReportViewerControl::displayErrorMessage(Object , Object[] , Boolean& ) at [Microsoft.Dynamics.AX.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters) at callILClassMethod(interpret* ip, Char* method, UInt32 chdl, cqlClass* c) at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.InvokeCommand(CommandInteraction interaction, CommandCallbackInteraction& result) at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.HandleCommandInteraction(CommandInteraction interaction, List`1 outboundInteractions) at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.HandleInteractions(IInteractionChannel interactionChannel) at [aoskernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionManager.ProcessMessages(Object stateinfo) at [mscorlib.dll]System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at [mscorlib.dll]System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at [mscorlib.dll]System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at [mscorlib.dll]System.Threading.ThreadPoolWorkQueue.Dispatch()</wchar_t\,std::char_traits</wchar_t\,std::char_traits</wchar_t\,std::char_traits

So I started to look around a little and found the System administration – Setup – Server Configuration and noticed that there were 2 servers… in a OneBox Environment…

                     SNAGHTMLa4c1c3d

The migration server was still there and it seemed that it was trying to have that one generate the report. When I removed the extra server it started working

/Johan

Database Syncing

Hi…

Today we are doing a DB upgrade in Dynamics 365 for Operations. One of the steps in the process includes installing a hotfix which in turn triggers a database sync. The Sync failed so I tried to find a way to run it manually and since the environment is a TEST environment it does not have Visual Studio. Powershell to the rescue:

I:\AosService\WebRoot\bin\Microsoft.Dynamics.AX.Deployment.Setup.exe -bindir "I:\AosService\PackagesLocalDirectory" -metadatadir "I:\AosService\PackagesLocalDirectory" -sqluser "axdbadmin" -sqlserver "Demo-00000000" -sql database "AxDB" -setupmode "sync" -syncmode "fullall" -isazuresql "true"

Links:
https://community.dynamics.com/ax/b/axilitynet/archive/2016/01/28/ax7-database-synchronization-w-o-visual-studio

The Real-Time Service call Failed when trying to use CloudPoS

One of my colleagues contacted me today about an issue. When he was logged into the Dynamics 365 for Operations  Cloud POS and he tried to perform a “Real-Time Operation” such as resetting a password he got this error:

4BF47ABA

To reproduce it I tried to do the same, and low and behold it worked… we used the same PoS worker and we had the same Roles in Dynamics…

While he was doing some more testing i logged in to the Dynamics Server using RDP to see if there was anything in the Event viewer… Found something!

Real-time Service client library call for API ‘InvokeMethod’ method ‘UpdateStaffPassword’, language ‘sv-SE’, and company ‘usrt’ failed. Exception: ‘System.ServiceModel.FaultException`1[Microsoft.Dynamics.Retail.TransactionServices.ClientProxy.Fault]: Fault was thrown by the service for request c7f48632-52a9-447e-ba42-9d7cb4c800ba. Exception details:
Type: Microsoft.Dynamics.Ax.Xpp.ErrorException

Message: The language sv-SE is not supported by Microsoft Dynamics 365 for Operations
. For a list of supported languages, see Microsoft Dynamics 365 for Operations Online. (Fault Detail is equal to Microsoft.Dynamics.Retail.TransactionServices.ClientProxy.Fault).’.

The language sv-SE is not supported by Dynamics 365 for Operations… that’s better… now I know where to look. My browser was using english and my colleague was using swedish. We changed it to look like this by switching the order and moving English to the top…

image

… it worked !!!

That is all for today

/Johan

Configuring access for mobile warehousing app in Dynamics 365 for Operations

Today I am setting up the mobile warehouse app in Dynamics 365 for operation… there is a very nice Wiki article here with the walkthrough but I am doing a slightly condensed version.

  1. Go to the azure portal. In Azure Active Directory – App Registrations create a web application for the warehouse portal

    Name: WhatEverYouWant
    Application Type: Web app/API
    Sign-on URL: https://[theURLforyourdynamicsinstance]/oauth

  2. Open the application to edit it
  3. Verify Application ID. If you create the Application in the new new portal it will auto generate an AppID which is random. If you use the old portal to create the application you will have to add the App ID URI. Make sure that this URI is NOT your Dynamics 365 for operations URL because this will break for instance Excel Add-in and Management Reporter. For more information look here
  4. Note: the next step did not work from the new portal so I had to perform it from the old portal.
  5. Go to the old Azure Portal – Active Directory – [Your AD] – Applications and select the application you created in the previous step
  6. Under Permissions to other applications click add application and add Microsoft Dynamics ERP
  7. Add the following permissions

    Access Dynamics AX online as organization users
    Access Dynamics AX data
    Access Dynamics AX Custom Service

  8. In the new portal in the application permission click keys, enter the name for your new key and set a duration. When you click save you will get the key. Please remember to copy and save it some where because it will not be visible later.
  9. Now you need to save the ClientID (Old Portal)/Application ID (New Portal) for later.
  10. Log into Dynamics 365 for Operations and go to System Administration – Users and create a new user (in my case called WMAPP. The email address can be anything since it will never be used. The user needs these roles

    Warehouse mobile device user

  11. Now we need to associate the user to the AD Application which is done on System Administration – Setup – Azure Active Directory applications. Here we paste the App ID/ClientID from before and select the user we created. Click Save and you are done.
  12. Install the App from app store and enter these settings:

    SNAGHTML12dda1b

    1. Azure Active Directory ID: AppID/CleintID from step 9
    2. Azure Active Directory Client Secret: The key from step 8
    3. Azure Active Directory Resource: Your Dynamics 365 URL
    4. Azure Active Directory Tennant: https://login.windows.net/yourADtennant
    5. Company: Dynamics 365 for Operations Legal Entity

Links:
https://ax.help.dynamics.com/en/wiki/install-and-configure-dynamics-365-for-operations-warehousing/

DynamicsPodden – Avsnitt 5 – Technical Conference 2017

Howdy…

Vi har i veckan varit i Seattle och besökt Technical Conference 2017 för att se var Microsoft har på gång vad det gäller Dynamics. Vi har dagen till ära spelat in ett extra avsnitt där vi pratar lite om våra reflektioner på konferensen. Det kommer garanterat att komma med så småningom.

/DynamicsPodden

DynamicsPodden – Avsnitt 3 – Mobilitet

Hej

Då var vi tillbaka med ett nytt avsnitt av DynamicsPodden. Denna gång har Emelie, Jonathan och Johan samlats för att prata om mobilitet. Vad betyder egentligen Anywhere, Anytime? Hur ser upplevelsen ut på mobila enheter, hur är kompatibiliteten med andra browsers och vad behöver vi fundera kring när det gäller säkerheten?

Håll till godo

/DynamicsPodden 

PowerBI breaks Workflow Editor and Report Editor

I am so sorry about the click bait title… I could not resist Smile

Todays adventure consists of troubleshooting why Report Editor and Workflow Editor stopped working in our Dynamics 365 for Operations environment. First som history:

This all started in one of our environments where we noticed that Report Designer for Management Reporter (Financial Reports) was not working… after some troubleshooting we called MS Support and did two days of troubleshooting I got the suggestion to try this in another environment (I am a little annoyed that I did not do this before) and of course it worked. Well, that did not really provida a lead to the root cause. One day later I got a request to configure PowerBI in the environment where it worked and later that day once again tested in the  “working” environment and low and behold… it did not work!!! What the_____? This got me thinking about what could have caused this… I installed PowerBI… could it be… Yes it could.

I remembered that I had read in the description of the PowerBI configuration that there was a caveat in the configuration of the Azure AD Application: 

App ID URI: This value is mandatory, but isn’t required for the workspace integration. Make sure that this App ID URI is a mock URI like https://contosoAX, since using the URL of your deployment can cause sign-in issues in other AAD applications such as the Excel Add-in.”

So I went back to Azure AD and I had unfortunately not done this…

Bildresultat för facepalm

I changed this in both environments and… Voilá… it worked.

Note: This has been changed in my original post on PowerBI Smile

Links:
http://blog.johanpersson.nu/?p=2351
https://ax.help.dynamics.com/en/wiki/configuring-powerbi-integration/