Sunday, March 20, 2022

D365 F&O - Package deployment on sandbox and production environments

This post covers package deployment for cloud environments.


To do the D365 F&O package deployment (Deploying customizations across D365 F&O environments), create the deployable package and deploy on sandbox and production environments. Microsoft provides Sandbox as free environment, it is a staging environment. Before we move the changes to production, we need to deploy on sandbox first, once the package is deployed on sandbox then only we can deploy on production.


Microsoft is taking responsibility to do the deployment for the sandbox and production environments. That means we can upload the package and push to start the deployment process, Microsoft will take care the deployment steps like compilation, database synchronization, report deployment, etc.


Deployment steps are very simple, upload the package on LCS project asset library, apply updates on Sandbox, mark the deployed package as release candidate and schedule deployment on production. We have the option to rollback our changes, also we have the option to create support ticket with Microsoft (LCS project>Work items>Support issues>Submitted to Microsoft) for deployment related issue, make sure you enabled the notifications on LCS user settings to get the deployment related email updates.


Navigate to the LCS project


Asset library


Software deployable package and upload our package


Navigate to Sandbox environment on the project overview page,


Select "Apply updates" on the sandbox environment details section


Select our uploaded package


The deployment process is started and we can see the progress on the sandbox environment details section


Once the deployment is done on the sandbox, make the deployed package as release candidate for moving to production.




To initiate package deployment on production, navigate to production environment details page and select Maintain>Update Environment, and then select our package and mention the production downtime.


Note: These all are manual steps, but till sandbox package deployment can be achieved through DevOps continuous deployment (Automated deployment) using Azure DevOps release pipeline.

Sunday, March 13, 2022

D365 F&O - Create deployable package

In AX 2012, we use xpo, model and model store for deployment. Of course, we should not use xpo for deployment, it will create some issue in future when we follow the model deployment or model store deployment, we might face some other issues also.

For production deployment, we need to use model store deployment.

In D365 F&O, There is no xpo or model store, only models are available. Packages are used to do the deployment, package can have multiple models.


How to create packages?

Deployable package can be created from Visual Studio. Before we create a deployable package, we should compile the models. Compilation is mandatory. For example, if you modify some objects and not compiled then it may create some problem on the production, because the files are not updated. In the time of compilation, the system create some binary files, dll files on the system these files are used in the time of deployable package creation.


Dynamics 365 > Build models


Select the model and click build button


Compilation status will appear

Dynamics 365>Deploy>Create Deployment Packages...

Select the path where the deployable package should be placed

Select the model and click "Create" and we will get "Package created." message once its done.


Package file is created

The package files contains all binary files

If you look into the deployable package, all files are binary files. Only the binary files are moved to production, no codes. I am not sure that we will get the code base if our development machine got corrupted and not using version control, but definitely Microsoft can help us.

But, we should always use version control.

Note: This post is to explain about the deployable package, but it is not the best practice to create the deployable package, because

1. When you work with more than two developers then it won't work properly, you need to take latest version always

2. If you modified some objects like CustTable table but not yet completed and it is in progress, in this state, modified objects/not checked in objects also will move to production

So, the best practice to create the deployable package is build automation process. I will try to create another post for how to create build automation process.

For more information about the deployable package creation, please refer here

Thursday, March 10, 2022

Microsoft.Dynamics.Ax.Xpp.ErrorException: 'Argument to method setFieldValue out of range.'

Just a quick post.


Microsoft.Dynamics.Ax.Xpp.ErrorException: 'Argument to method setFieldValue out of range.'


We may face this error in the time of SSRS report development. For my case, some new fields are added on the RDP temporary table, but I forgot to add the DB sync on the time of build. So, I got this error and checked the table design on the DB and confirmed that new fields are not created on the table.


After I did the DB sync, the fields are not get created, so I have added one temporary field and synced and removed the temporary field and synced. It worked.