Scenario: We were using dev environment of Dynamics Finance and Operations with Application release version 10.0 platform update 24. Microsoft released a new version 10.0.5 with platform update 26.
Now we have two options to use the new version.
- Download new VM and moved the custom models to the newly created VM
- upgrade the current VM on the latest update
In first option we need to create and setup the testing data again to test the code.
2nd option everything will remain same and no extra effort needed other than the applying update.
Definitely we selected the 2nd option and below steps were performed to update the environment.
- Download the latest release package from the asset library to the local VM development environment
- Unzip the zip file to the local VM in C drive by creating a custom folder (folder should not be in the users folder directory). I created with below name FnO10.0.234.10001App
- Stop the following services (Batch, Data import and IIS)
- Close Visual studio instances
- open command prompt as administrator
- set the directory to your custom folder contains the unzip files
- Run the below command to check the list of components installed
- C:\FnO10.0.234.10001App>AxUpdateInstaller.exe list
- From the above command you will get all the components already installed
- update the DefaultTopologyData.xml file located in the update folder in my case located in below location
- FnO10.0.234.10001App -> DefaultTopologyData.xml
- Best way to update this file copy on another location edit like below and replace in the above folder
- Generate the run book thru command prompt using below command
- Actual command: AXUpdateInstaller.exe generate -runbookid=[runbookID] -topologyfile=[topologyFile] -servicemodelfile=[serviceModelFile] -runbookfile=[runbookFile]
- [runbookID]– A parameter that is specified by the developer who applies the deployable package.
- [topologyFile]– The path of the DefaultTopologyData.xml file.
- [serviceModelFile]– The path of the DefaultServiceModelData.xml file.
- [runbookFile]– The name of the runbook file to generate (for example, AOSRunbook.xml).
- Should be modify as below
- AXUpdateInstaller.exe generate -runbookid=”Dev-runbook” -topologyfile=”DefaultTopologyData.xml“ -servicemodelfile=”DefaultServiceModelData.xml” -runbookfile=”Dev-runbook.xml”
- Import the run thru command prompt using below command
- AXUpdateInstaller.exe import -runbookfile=”Dev-runbook.xml”
- Execute the runbook thru command prompt using below command
- AXUpdateInstaller.exe execute -runbookid=”Dev-runbook”
This step is the longest step involving many sub-steps performed during this step.
Some steps even takes 2,3 or may more hours. please make sure system will not logout neither shutdown.
if any step fails during this step use below command to rerun
For me its fails on 19 step
Wait till last step completed
- Verify the installation by running below command
- AXUpdateInstaller.exe list
You can check the version also by login to the dynamics browser about option.
Please leave comment in the comments section if you are facing any issue while updating. I will try to assist.
Scenario: Sometime we need to uninstall a deployable package from the UAT or Production environment.
Below are the steps that need to be performed to uninstall a package.
- Create a deployable package using visual studio or Build server
- Do not extract the deployable package that is in ZIP folder (If you extract the zip folder you will face issue invalid HotfixInstallationInfo.xml file)
- Just open the deployable package zip folder
- Go to Deployable package zip folder -> AOS service -> Scripts folder
- create a text file name ‘ModuleToRemove’
- Write the module name to be removed in the the ModuleToRemove file
- If you have multiple models to remove then write mode name per line as below
- Note: In multiple models removing write the models name in sequence as per dependency sequence
- Go back to main zip folder and find the file HotfixInstallationInfo.xml ,copy the file to some other location and edit the file like below
- Edit the file should be same as above.
- Copy and replace the HotfixInstallationInfo.xml file in the deployable folder
- upload the file in the asset library and apply the package to the UAT environment first if applied successfully then apply to the production environment.
Please leave comments if you are facing any issue.
Sometimes we need to delete the model and deployable package from the dev environments.
use Modelutil.exe to delete the model file from the packages local directory.
Package installation or deletion:
- Stop IIS (kill the IIS worker process from the task manager)
- Stop batch job DynamicsAXBatch job
- Delete the package folder located on C:\ or K:\AosService\PackagesLocalDirectory (make sure folder completely deleted)
- Open VS Dynamics -> Model Management -> Refresh models
Sometimes users facing below issue in generating the reports from Dynamics 365 for Finance and operations or Developers while deploying the reports
- Failure! Status check of Report Server –
- The remote server returned an error: (500) Internal Server Error – Report design not found
- Report design not found
Restart the below services by going on the services list window of the report server or from the LCS
- Restart the service report server
- Check and restart the Microsoft SQL Server instance service
Note: If the server is sandbox environment managed by Microsoft then go the Power BI (report server) VM and restart the above services
Common Data Service allow you securely store and manage data that is used in the Business Applications.
Data within common data service is stored within set of records called entities. An entity is a set of records used to store data, similar to how a table store data within the database.
Entities – Common Data Service
Chain of Command now supports the more scenarios for the extensions on forms:
Now you can wrap the methods on forms, Forms data sources, Datafields and on form control methods.
- Form Data Sources
- Form Controls
- fields in data sources
Below is the complete example of Form Data source and just a code snippet for the rest. In below example we are updating the ratingmodel based on our custom logic that is global variable on the form.
Note: use element.FormToExtendVariable to access the form variables and datasources
Use element.FormToExtendMethod() to call the form methods
- [ExtensionOf(FormStr(FormName))] // for form extension
- [ExtensionOf(FormControlStr(FormName,FormControl))] // for form control method extension
- [ExtensionOf(FormDataFieldStr(FormName,FormDataSource,DataField))] // for form datasource method extension
- [ExtensionOf(FormDataSource(FormName,FormDataSource) // for form data source extension
Scenario: Sometimes developer needs table id of the table to use in their logic
Solution: you can get the table id for any table using sql query in the development environment.
SysTableIdView is the table from where you can fetch the Id.
Below is the query
select * from SysTableIDView
Scenario: Sometimes you need to extend the form init method in Dynamics 365 for Finance and Operations.
Below is sample code to extend:
/// <param name=”args”></param>
[PostHandlerFor(formStr(HcmRatingLevelIdLookUp), formMethodStr(HcmRatingLevelIdLookUp, init))]
public static void HcmRatingLevelIdLookUp_Post_init(XppPrePostArgs args)
FormRun fr = args.getThis();
//you have form run object to access the controls and datasources of form
Below are the list of features that added in the Application release 10.0.6 and platform update 30.
Scenario: Sometime during deployment users facing low space issue and deployment got failed.
Reason: The reason is deployable packages folder having many files that increase the drive used space. Microsoft by default deployable packages will delete after 30 days. If you deploy packages many times during the last 30 days. then you need to reduce the time of delete deployable packages
- Under the HKLM:\SOFTWARE\Microsoft\Dynamics\Deployment registry key, you can create the following keys to customize when cleanup should occur. The automated cleanup task will consider these values.
- CutoffDaysForCleanup – The number of days that old packages and logs should be retained. The default value is 30.
- CutoffDiskSpaceLimitForPackages – The minimum free disk space (in gigabytes [GB]) on the service volume drive where the package folder is located. For example, if the disk space is 200 GB, the cleanup task will remove the packages, based on the number of days.
- CutoffDiskSpaceLimitForLogs – The minimum free disk space (in GB) of the system drive where the log folder is located. For example, if the disk space is 100 GB, the cleanup task will remove the servicing-related logs, based on the number of days.