Posts

The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop

 While updating local server to platform update 39, I got below error. The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: System.Management.Automation.RuntimeException: An exception of type System.Net.WebException occurred when making an http request to: http://127.0.0.1/ReportServer. Refer to the log file for more details. Issue was resolved by just  Navigate to folder where your package is located, and right click on folder and uncheck Read-only, and click Apply. You will get pop-up asking to apply change to inner folders and files, select yes. Navigate to  C:\AosService\PackagesLocalDirectory location can be different depending on server. Find folder " SystemHealth ". and uncheck Read-only and click Apply. Re-run step where your update was failed.

The required assembly 'Microsoft.Dynamics.Framework.Tools.ApplicationExplorer.dll' does not exists.

 I was applying Platform update 10.0.14 to one of our internal server when I got this error. The required assembly 'Microsoft.Dynamics.Framework.Tools.ApplicationExplorer.dll' does not exists. To resolve this error I just copied dll to location on which it was throwing error and that's it. I rerun the step and my issue resolved. 

Timesheet periods have not been created for Employee

Recently i was trying to create timesheet record but was getting error "Timesheet periods have not been created for Employee". I have resolve this by performing following steps. 1. Goto Project Management and Accounting -> Setup -> Timesheets -> Timesheet period types. Select your Period Type and click on Generate Periods. Fill out the form and press OK. 2. Goto Human Resources -> Workers -> select your worker. 3. Goto Project Management tab and select Project Setup. Fill out the form select Period Type for which you just have generated periods. 4. Now you good to create timesheet record.  

Dynamics AX Transaction scope and UserConnection class

We have done some customization in AX which perform insertion and updating data on multiple tables. It oftens fails and we have no clue where it fails so we decided to implement logging just for knowing how much steps are performed up till and if it fails where did we fails. We decided we will create separate table for logging and records every step in table which is about to performed so in this way we detail about steps. Normally we perform all activity in one transaction so if something fail whole process should be reverted but we want that our log should persists in table. There is a class UserConnection which exactly do what we wanted it to do. You just have to create its instance and on table just mention that it AX should use this new connection for this particular table. I am giving you an example.   static void SampleUserConnection_Job(Args _args) { VendTable vendtable; MyLogTable myLogTable; UserConnection userConnection = new UserConn

Dynamics 365 Error : Unable to resolve dependency dynamicsax-dimensionsformadaptor

We were removing over layering from our code and while creating deployment package we got this error "Unable to resolve dependency dynamicsax-dimensionsformadaptor". This error comes because we were not including some models. So what you have to do is to check model dependency hierarchy and see on which models have dependency. Just include those models in your deployment or remove reference of model from your model. To check model dependency hierarchy in AOT model view right click on model and  View Package Dependencies > View Incoming References. To remove model reference  go to Dynamics 365 > Model Management > Update Model Parameters select your model and uncheck model which you want to exclude.

D365 Enable/Disable maintenance mode for DEV and UAT

There are two ways you can enable maintenance mode. 1. COMMAND: To enable maintenance mode open command prompt as Admin and execute below command J:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd ********* --setupmode maintenancemode --isinmaintenancemode true' To disable maintenance mode open command prompt as Admin and execute below command J:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd ********* --setupmode maintenancemode --isinmaintenancemode false Make sure you give the correct path of AOS service directory. 2. SQL: To enable maintenance mode write below query on sql se

Could not load file or assembly 'Microsoft.Dynamics.BusinessConnectorNet' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Image
Recently we were developing web service that that perform CRUD operation on AX 2009. We use business connector dll for this task. When we deploy app on IIS we start getting following error. Could not load file or assembly 'Microsoft.Dynamics.BusinessConnectorNet' or one of its dependencies. An attempt was made to load a program with an incorrect format. Dynamics AX .NET Business Connector contains both managed code and unmanaged 32-bit x86 code and as such it cannot be loaded by a 64-bit application. We resolved our issue by enabling 32 bit application in IIS. 1. Go to IIS. 2. Select you application pool. 3. Click Advance setting. 4. Set Enable 32-Bit Application to true.