Docentric Upgrade process

 

Docentric Upgrade process

 

Reference Links:

RSM KB Article:  https://dash.rsmus.com/kb?id=kb_article_view&sysparm_article=KB0031557

Docentric official link: How to Upgrade Docentric AX Models - Docentric AX

Docentric website to Download Models: Download Center

 

Steps to upgrade:

1.       Connect to a development environment in which you want to upgrade the Docentric version.

2.       Open a browser and Go to the Download Center and download the latest version of Docentric.

3.       Download 3 zip files

a.       Docentric AX Framework

b.       Docentric AX SSRS Replicas (Model with all replicas)

c.        Docentric AX CBD Replicas (Model with all replicas)

4.       Place them in C:Temp and extract all zip files. (Contains 6 model files with extension. axmodel)

5.        Open PowerShell as an administrator and paste in the below script to stop the services.

6.       Open up Visual Studio as an administrator.

7.       Check to see if there are any pending changes.

a.        If there are not any pending changes, proceed with the next step.

b.       If there are pending changes, exclude the changes.

8.       Go to 'Source control explorer -> Trunk -> 10-Dev -> Metadata -> Locate the model we want to delete -> right click and Delete model'.

a.       Note: Ignore any error messages as source control should still reflect the model being deleted.

9.       Delete other models which are related to Docentric.

10.    Navigate to pending changes, and check-in the pending deletion of the model adding a meaningful comment.

11.     Right Click 10-Dev and do get latest version. 

 

12.    Close Visual Studio.

13.     Open the File Explorer and navigate to 'K:\AosService\PackagesLocalDirectory'.

14.    Within the 'PackagesLocalDirectory', navigate to the model folder we are updating and delete the entire folder.

a.        If conflict occurs, make sure Visual Studio is closed, open services, and stop Microsoft Dynamics 365 Unified Operations: Batch Management Service

15.     Open PowerShell as an administrator and paste in the below script to start the services. 

16.    Open an administrator command prompt and run the following import command for all 6 models. Examples are attached in the file below.

a.  "K:\AosService\PackagesLocalDirectory\bin\ModelUtil.exe" -import -metadatastorepath="K:\AosService\PackagesLocalDirectory" -file=[File path to downloaded model file]

 

17. 

18.    Check to see if there are any pending changes.

a.       If there are not any pending changes, proceed with the next step.

b.       If there are pending changes, exclude the changes.

19.     Go to Source control explorer navigate to 'Trunk -> 10-Dev -> Metadata'

20.    Right click the Metadata folder then 'Add items to folder' and select the specific model's folder.

a.       DO NOT select 'XppMetadata'

b.       Do this before running the compile.

c.        Go to the excluded items tab and include everything in that tab.

d.       Filter the included items by 'Size descending -> Select all empty Delta folders' and exclude them.

21.    Click 'Finish'

22.    Repeat step 20 and 21 for all 6 models.

23.    After importing the model files, 'Click Extensions -> Dynamics 365 -> Model Management -> Refresh Models' to refresh the models. Then run a build of the model by going to 'Extensions -> Dynamics 365 -> Build Models' and select the model we imported.

24.    After the model builds, go to 'Extensions -> Dynamics 365 -> Synchronize Database' and run a sync.

25.     Once the sync has completed, check-in the new model to source control with a meaningful comment.

26.    After checking it in, run a build of the Dev pipeline from Azure DevOps. If the build succeeds, the model has been successfully installed. 

27.    Merge the 2 changesets (Deleted changeset generated at step 10 and changeset generated at step 25) and create a package.

28.    Apply the package to Tier 2 environments.

 1st cmd

<#

.SYNOPSIS

    Stops all D365 services

.DESCRIPTION

    Stops all D365 services that could potentially lock local files.

#>

using namespace System.Security.Principal


[CmdletBinding()]

param ()


# Shutdown commands to pass to subconsole

$CommandList = @(

    'Write-Host -ForegroundColor Cyan ''[*] Stopping services...''',

    'iisreset.exe -Stop',

    'Stop-Process -Name batch.exe -ErrorAction SilentlyContinue',

    'Stop-Process -Name "iis*" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "IISADMIN" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "DynamicsAxBatch" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "*Dynamics.AX.Framework.Tools.DMF*" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "LCSDiagnosticClientService" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "MR2012ProcessService" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "MSSQLFDLauncher" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "ReportServer" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "MsDtsServer130" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "MSSQLServerOLAPService" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "SSISTELEMETRY130" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "SSASTELEMETRY" -ErrorAction SilentlyContinue',

    'Stop-Service -Name "SQLTELEMETRY" -ErrorAction SilentlyContinue'

)


# Subconsole process arguments

$ProcessArgs = @{

    ArgumentList = [string]::Join("`n", $CommandList)

    FilePath = (Get-Command "powershell.exe").Source

    Wait = $true

}


$User = [WindowsPrincipal]::new([WindowsIdentity]::GetCurrent())


# Customize arguments based on admin status

if (-not $User.IsInRole([WindowsBuiltInRole]::Administrator)) {

    $ProcessArgs["Verb"] = "RunAs"

    Write-Host "[*] Launching elevated subconsole..." -ForegroundColor Cyan

}

else {

    $ProcessArgs["NoNewWindow"] = $true

}


# Launch the elevated subconsole

Start-Process @ProcessArgs


# Customize exit message based on subconsole return code

if ($?) {

    Write-Host -ForegroundColor Cyan "[*] All services were successfully shutdown"

}

else {

    [Console]::Error.WriteLine("[x] Failed to shutdown all services")

}


point 15------------------------------------------------------------------------------------------------

2. <#

.SYNOPSIS

    Starts all D365 services

.DESCRIPTION

    Starts all D365 services that could potentially lock local files.

#>

using namespace System.Security.Principal


[CmdletBinding()]

param ()


# Startup commands to pass to subconsole

$CommandList = @(

    'Write-Host -ForegroundColor Cyan ''[*] Starting services...''',

    'Start-Service -Name "MSSQLFDLauncher" -ErrorAction SilentlyContinue',

    'Start-Service -Name "ReportServer" -ErrorAction SilentlyContinue',

    'Start-Service -Name "MsDtsServer130" -ErrorAction SilentlyContinue',

    'Start-Service -Name "MSSQLSERVER" -ErrorAction SilentlyContinue',

    'Start-Service -Name "MSSQLServerOLAPService" -ErrorAction SilentlyContinue',

    'Start-Service -Name "SSISTELEMETRY130" -ErrorAction SilentlyContinue',

    'Start-Service -Name "SSASTELEMETRY" -ErrorAction SilentlyContinue',

    'Start-Service -Name "SQLTELEMETRY" -ErrorAction SilentlyContinue',

    'Start-Service -Name "DynamicsAxBatch" -ErrorAction SilentlyContinue',

    'Start-Service -Name "*Dynamics.AX.Framework.Tools.DMF*" -ErrorAction SilentlyContinue',

    'Start-Service -Name "LCSDiagnosticClientService" -ErrorAction SilentlyContinue',

    'Start-Service -Name "MR2012ProcessService" -ErrorAction SilentlyContinue',

    'Start-Service -Name "IISADMIN" -ErrorAction SilentlyContinue',

    'iisreset.exe -Start'

)


# Subconsole process arguments

$ProcessArgs = @{

    ArgumentList = [string]::Join("`n", $CommandList)

    FilePath = (Get-Command "powershell.exe").Source

    Wait = $true

}


$User = [WindowsPrincipal]::new([WindowsIdentity]::GetCurrent())


# Customize arguments based on admin status

if (-not $User.IsInRole([WindowsBuiltInRole]::Administrator)) {

    $ProcessArgs["Verb"] = "RunAs"

    Write-Host "[*] Launching elevated subconsole..." -ForegroundColor Cyan

}

else {

    $ProcessArgs["NoNewWindow"] = $true

}


# Launch the elevated subconsole

Start-Process @ProcessArgs


# Customize exit message based on subconsole return code

if ($?) {

    Write-Host -ForegroundColor Cyan "[*] All services were successfully started"

}

else {

    [Console]::Error.WriteLine("[x] Failed to start all service")

}

16-------------------------------------------------------------------------------------------


"K:\AosService\PackagesLocalDirectory\bin\ModelUtil.exe" -import -metadatastorepath="K:\AosService\PackagesLocalDirectory" -file="C:\Temp\DocentricAX_3.5.1.4\DocentricAX\Docentric AX.axmodel"


"K:\AosService\PackagesLocalDirectory\bin\ModelUtil.exe" -import -metadatastorepath="K:\AosService\PackagesLocalDirectory" -file="C:\Temp\DocentricAX_3.5.1.4\DocentricAX\Docentric AX Extension.axmodel"


"K:\AosService\PackagesLocalDirectory\bin\ModelUtil.exe" -import -metadatastorepath="K:\AosService\PackagesLocalDirectory" -file="C:\Temp\DocentricAX_3.5.1.4\DocentricAX\Docentric AX Emails.axmodel"


"K:\AosService\PackagesLocalDirectory\bin\ModelUtil.exe" -import -metadatastorepath="K:\AosService\PackagesLocalDirectory" -file="C:\Temp\DocentricAX_3.5.1.4\DocentricAX\Docentric AX Warehouse Labels.axmodel"


"K:\AosService\PackagesLocalDirectory\bin\ModelUtil.exe" -import -metadatastorepath="K:\AosService\PackagesLocalDirectory" -file="C:\Temp\Model - Docentric AX SSRS Replicas 3.5.1.4\Model - Docentric AX SSRS Replicas\Docentric AX SSRS Replicas.axmodel"


"K:\AosService\PackagesLocalDirectory\bin\ModelUtil.exe" -import -metadatastorepath="K:\AosService\PackagesLocalDirectory" -file="C:\Temp\Model - Docentric AX CBD Replicas 3.5.1.4\Model - Docentric AX CBD Replicas\Docentric AX CBD Replicas.axmodel"



Comments

Popular posts from this blog

Price disc agreement

Sample integration

Create ledger journals in D365FO using X++ + LedgerDimensionACType