Skip to main content

Applying Service Updates to On-Prem Environment in D365 F&O

 Hello Devs!

In case of On-Premises environments we need to apply service updates using CMD and below are the series of steps and commands.



Prerequisites:

1) Access to LifeCycle Services(LCS). 


Step 1 : 

 Login to LCS, Check for the latest available service updates and download it.


Download package and Unzip the package(Don't forget to unblock it before extracting, Right click and check unblock).



Step 2 :

Navigate to the folder where file has been extracted using CMD and Execute the below command to check for the installed versions of the services

ServiceUpdate2 is my folder where I have extracted the file. 


C:\ServiceUpdate2>AXUpdateInstaller.exe list

Copy and save the output for future use, In my case it look like this




Now, Edit DefaultTopologyData file placed within the extracted folder.  Add those services which we have copied in last step and change the machine name(In my case its VW-LAB-Dyndev1).


Step 3 :
We need to execute below series of command


Note : In my case the I was using C Drive and DP2 is my folder where I have extracted the file.

1) The folder in which the package is placed, it should be non user folder and there should be no space within title of the folder (All folders that are in file path)

Example : C/User/Download (Will result in error, User folder error)

C/Program files/Package (Will result in error, space within path).



Series of CMD commands:


You should rename the RunbookFile 


1) Check the available list of Runbook

C:\DP2>AXUpdateInstaller.exe list

2) 

C:\DP2>AXUpdateInstaller.exe generate -runbookid="AFPRunBookId-runbook" -topologyfile="DefaultTopologyData.xml" -servicemodelfile="DefaultServiceModelData.xml" -runbookfile="AFPRunBookId-runbook.xml"


Note : "AFPRunBookId-runbook" is the book title in my case, You have to set as per your case.

3) 

C:\DP2>AXUpdateInstaller.exe import -runbookfile=AFPRunBookId-runbook.xml

Note : "AFPRunBookId-runbook" is the book title in my case, You have to set as per your case.

4) 

C:\DP2>AXUpdateInstaller.exe execute -runbookid=AFPRunBookId-runbook.xml

5)

C:\DP2>AXUpdateInstaller.exe execute -runbookid=AFPRunBookId-runbook



It will take 3-4 hours as it involve more than 60 steps to be completed for successful service update. After the installation you can compare the versions.


Things to note :
1) Step may fails and it could be due to multiple issues for that we can check the log file placed in the same extracted folder and then "Rerun" the step again using below command.
In my case the command look like this
C:\ServiceUpdate2>AXUpdateInstaller.exe execute -runbookid="AFPRunBookId-runbook" -rerunstep=19

Standard command : 
AXUpdateInstaller.exe execute -runbookid=[runbookID] -rerunstep=[stepID]

2) There is a flaw in scrips from MS and normally step 24 fails due to reporting service error. Just restart the service and rerun the step again using above command or restart the service before step 24. 

Hope you find this information helpful. 



Comments

Popular posts from this blog

Update record set using update_recordset in d365 F&O | AX 2012 using X++

Hello Devs! One the most common condition that we being a developer faces is to update existing records set that is mostly done on report level when we need to add new fields in the Temporary table and we don't wants to make extensions on class level. Here is a small piece of code that will assist you in updating existing record sets.  update_recordset custAgingReportTmp                 setting                 CMTCustInternalCollector = hcmWorker.PersonnelNumber,                 PaymDayId                         = custTable.PaymDayId,                 PaymTermId                       = custTable.PaymTermId,                 CashDisc      ...

Import DB backup from .BacPac file in D365 F&O using CMD

Hello Devs! This is one of the most quickest way to import DB from .Bacpac file. Bacpac files are those which are generated from Tier 2 or higher environments as a DB backup.   Alternate Approach ----> Using wizard Prerequisites: 1) Access to LCS folder Asset library --> Database Backup Incase you don't see the folder ask your project owner to give you the access. Step 1:  Download the file and save it in local non-user directory.  Step 2: - Services to be stopped World Wide Web Publishing Service Management Reporter 2012 Process Service Microsoft Dynamics 365 Unified Operations: Batch Management Service Microsoft Dynamics 365 Unified Operations: Data Import Export Framework Service - Download SqlPackage.Exe.  Download link :  https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver15 Extract it and Open CMD as admin.  Step 3 :  Navigate to directory where you have extracted the SqlPackage.Exe folder us...

Adding D365 F&O Extension in Visual Studio 2022 | Dynamics

  Hello Devs! This is a very common scenario when it comes to enabling D365 extension within VS 2022, so for that below are list of steps needs to be done to enable extension for development. Please note for Older VS versions please refer to my blog below : https://www.linkedin.com/feed/update/urn:li:ugcPost:7033677029451440128/ Prerequisites: Visual Studio 2022 should be installed before performing below steps. Step # 1: Login to LCS (Microsoft Dynamics lifecycle services). In the main page after login there is a option of Shared asset library (without entering into project folder). Step # 2: In the list of sub menus , Select Software deployment package and search for latest Service update. For my case I am downloading 10.0.41 Step # 3 : Once you have downloaded it. Unzip the folder and search for FinanceAndOperations_10.0.2015.54_Application\DevToolsService\Scripts Before installation you will not be able to see Dynamics 365 option within VS 2022. Now please clos...