Saturday, March 14, 2026

D365 Finance and Operation version upgrade process for Cloud hosted environments



Overview: Microsoft has made version upgrades mandatory in Dynamics 365 Finance and Operations. You are allowed to skip only one version during the upgrade process.

Example: If your current version is V46, you can skip V47, but then you must upgrade to V48. If you don’t, Microsoft will automatically upgrade your Production (PROD) and Tier-2 (UAT/Pre-Prod) environments.

Key Points Before Starting

- Do not upgrade your Tier-2 (UAT/Pre-Prod) to a Preview version.

- Preview versions are for exploring new features only.

- Always wait for the General Availability (GA) release before testing or upgrading.

Upgrade Process – Step by Step

1) Identify the version you need to upgrade (e.g., V47 or V48).

2) Review the Microsoft release plan for upgrade timelines. (Note: Dates may shift in some cases.)

3) Go to LCS > Asset Library → Click Import to check if the version package is available.

Ex: Below screenshots show V44.

4) Download the upgrade package to your project.

5) Start the upgrade activity initially with 1 Dev VM and 1 Test (TST) VM.

6) Navigate to your Dev/TST VM → Full details → Go to Maintain →  Apply Upgrade.

7) Select the downloaded package. Confirm if prompted.







8) Monitor the upgrade process on the Environment Details page.

9) The system usually runs 62–64 steps. Once completed, verify the upgrade is shown on the Environment Details page.

At this stage, Dev & TST VMs are upgraded and ready for testing.

Few of Challenges faced during previous upgrades

Scenario 1 – Upgrade from V40 to V42

- The upgrade may fail at step 24 (or another step).

- For V42, additional components must be installed in Visual Studio for LCS Cloud-hosted Dev/TST environments.

- For Tier-2 and PROD, Microsoft handles this automatically.

Scenario 2 – Upgrade from V38 to V40

- Build may fail if a custom package does not reference a newly added module.

- Always check the runbook log to find the cause of failure.

If you cannot resolve the issue, raise a support case with Microsoft. However, note:

- Microsoft support may only give suggestions.

- Sometimes, they may recommend decommissioning the existing VM instead of fixing it for Cloud hosted dev.

Testing Process After Upgrade

1) Download feature list for Finance & SCM from MS portal and track them in Excel.

2) If upgrading from V46 → V48, also download release notes for V47, since V48 includes V47 features.

3) Check for features enabled by default (mandatory). Some may not appear in Microsoft’s documentation but could still be active after upgrade. Include these in your testing.

4) Work with Finance & SCM functional consultants to identify features relevant to your business.

5) Focus only on features impacting your business processes instead of testing every released feature.

6) Validate that existing customizations and business scenarios still work.

7) After Dev/TST validation, upgrade your Tier-2 (UAT/Pre-Prod) and run test cases again.

8) Involve your client’s internal testing team to execute scenarios and provide sign-off.

9) Finally, plan the Production upgrade. The process is similar to moving custom packages from Tier-2(UAT/Pre-prod) to PROD.

10) Upgrade your build and other environment to match with Prod environment version.

Final Notes

- Always keep track of new features introduced in every version, but test only those relevant to your business.

- Document issues faced during upgrade, along with logs.

- Get proper sign-off before moving to Production.

- In some cases, the Tier-2 and PROD will be upgraded automatically by Microsoft, but the Dev and TST VM will be older version. We have to make sure all our Dev/TST/Build VM versions are matching with your PROD VM, skipping or working on lover version is not recommended.

How to skip the version upgrade process for more than one version:

It's with Microsoft team, if you have a valid business reason's, MS team will allow you to skip multiple version upgrade process, so that your Tier 2 and PROD will not upgrade forcefully.

Disclaimer: Please note that these suggestions are based on my personal experience and may not be the only version upgrade process. As always, thoroughly discuss your senior technical team and test any changes in your test environment before upgrading the PROD.

Custom Data Entity Not Showing in Entity List in D365 Finance and Operations on Unified Development/Sandbox Environment (PPAC)

he Problem I Faced:

I added a new custom data entity with a computed column in Dynamics 365. Everything looked fine - the online build and sync succeeded. I also verified from the online build history, and it showed as completed. I then executed the entity refresh, and it was completed successfully. But the new entity wasn't showing up in the DMF entity list.

The Solution:

After investigation, I found that the entity had a sync issue, which I only discovered when I performed the Project Sync. I fixed the sync issue and then deployed the online build and sync again, followed by project sync and entity refresh. After this, the custom entity was successfully listed in the DMF entity list.

Key Lesson:

Online sync doesn't catch all problems. Always run Project Sync to validate your changes properly, especially when adding custom data entities.

Important Note:

Make sure your project property settings are correct:

  • Synchronize Database on Build = True
  • Deploy Changes to Online Environment = True

My Hope:

Since the unified environment is new, I hope Microsoft will fix this issue in future updates.

Have you faced this issue? Share your experience below!

Monday, September 22, 2025

My Experience Provisioning a UDE VM using PowerShell for D365 F&O – Issues and Fixes


There are many references available for provisioning a Unified Developer Environment (UDE) for D365 F&O. In this blog, I am sharing the issues I faced, my assumptions about the root cause, and the workarounds that helped me. I’ve also included the PowerShell script I used and the resources I followed in below. Thanks to all the blogs and references that supported me.

Key Observations

  • Ensure your local machine has enough capacity to install Visual Studio and add-ins(Power platform tolls for Vs 2022, Finance and Operations (Dynamics 365)).

  • While UDE can be created from PPAC, Microsoft recommends PowerShell provisioning.

  • Running all the PowerShell commands from a single script file together does not work. Each command must be executed step by step in sequence.

  • If you already have admin rights on your laptop, you may not face most of the issues below (except Issue 2 and Issue 3). These two are part of the prerequisites, which I had not fulfilled.

  • If you didn't have admin access on your laptop, you must have admin rights for both PowerShell (temporary admin access) and Visual Studio in your local computer.

  • UDE environments are important for building custom AI agents with Copilot Studio and integrating them with D365 F&O.

  • You can check the below link to know the advantages and limitation about UDE from AndrΓ©: Anyone using the new Unified Developer Experience (UDE) in D365FO? Feedback?

Issues, Assumptions, and Workarounds

Issue 1: PowerShell Module Error

Add-PowerAppsAccount -Endpoint prod or
New-PowerAppManagementApp -ApplicationId $appId failed with module import error.

Error message: The 'Add-PowerAppsAccount' command was found in the module 'Microsoft.PowerApps.Adminstration.PowerShell, for more information, run Import-Module Microsoft.PowerApps.Adminstration.PowerShell'

Explanation / Assumption:

Even when running PowerShell as Administrator, the script could not execute because my laptop blocked commands due to execution policies set by my organization.

Workaround:
With IT support, I first ran below script in PowerShell:

Set-ExecutionPolicy Unrestricted

After that, the command executed successfully.

Note: Before executing this commands, please validate with your internal admin team.

Issue 2: F&O License Missing or 1GB of Finance and Operation is not enough

This environment can’t be created because your org tenant does not have enough Finance and Operations Capacity.

Explanation / Assumption:

Even though 1 GB of Finance and Operations database storage was available, the script failed because the F&O license was not assigned to my account.

Workaround:
Once the license was allocated, I reran the script and the environment provisioned without error.


Issue 3: Dataverse Capacity Consumed

Error message:
“This environment can’t be created because your org (tenant) needs at least 1GB of database capacity.”

Explanation / Assumption:
My tenant had exceeded the allowed Dataverse capacity. Without freeing up or extending capacity, new environments cannot be created.

Workaround:
I enabled a Dataverse capacity extension in the Power Platform Admin Center, and the script executed successfully.



✅ After resolving the issues above, and the UDE was provisioned successfully.

  • Initially, the environment appears in Preparing state in PPAC.

  • After completion, the status changes to Ready.





Note: The UDE VM provisioning process took almost 2 hours. Before moving to the next step, make sure the add-in Power Platform Tools for VS 2022 is installed, as it is required to connect with Dataverse.









Issue 4: Dataverse Connection Failed in VS 2022

Error:
While connecting from Visual Studio 2022, Dataverse server name was required and the connection failed.

Explanation / Assumption:
The newly created UDE environment was available, but security restrictions (organization security app) blocked Visual Studio from connecting to Dataverse.

Workaround:
After authenticating of (organization security app), the connection worked. The download process started, and I could see updates in the output window.

πŸ‘‰ If you face this, check if any other security software is blocking the connection.

Issue 5: Incomplete Package Download

Error: Download ended prematurely, and unzip failed and Downloaded file was corrupted and unzip failed with error:
End of Central Directory record could not be found.

Explanation / Assumption:

Visual Studio attempted to download both PackagesLocalDirectory.zip and the DB (.bak) file within the 2-hour execution window. The download ended early, resulting in a corrupted zip.

Workaround:
Renamed the incomplete Dynamics365 folder to Dynamics365Old, reconnected using a different network, and retried. 

This time the download and unzip completed successfully.


After fixing the above two issue, Visual Studio automatically closed and the Extension 'Dynamics 365 'was successfully installed.







Note: The D365 F&O Extension download process took 2 hours to complete.


PowerShell Scripts which i executed: 
Set-Executionpolicy Unrestricted
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
$appId="XXXXXX-XX-4fac-XXX-XXXX"
New-PowerAppManagementApp -ApplicationId $appId

Add-PowerAppsAccount -Endpoint prod

$jsonObject= @" 
 "PostProvisioningPackages": 
 [ 
 { 
 "applicationUniqueName": "msdyn_FinanceAndOperationsProvisioningAppAnchor", 
"parameters": "DevToolsEnabled=true|DemoDataEnabled=true" 
 } 
 ] 
"@ | ConvertFrom-Json
New-AdminPowerAppEnvironment -DisplayName "XXXDev01" -EnvironmentSku Sandbox -Templates "D365_FinOps_Finance" -TemplateMetadata $jsonObject -LocationName "UnitedStates" -ProvisionDatabase


Resources:


πŸ‘‰ This was my journey of provisioning a UDE VM using PowerShell. Hopefully, it helps someone facing similar challenges.

Friday, August 22, 2025

Step-by-Step Guide to Move Your Custom Changes from Tier 2 to PROD in D365 Finance & Operations

Hey everyone,

πŸ‘‰ Not every Technical consultant gets the chance to schedule a PROD deployment, but it’s something they can learn. The process is easy and only takes a few steps to move the custom changes to PROD.

✅ Prerequisites

  1. You need LCS access for your project.

  2. The deployable package must already be deployed successfully to Tier 2 (preferably Pre-PROD or UAT).

  3. You need a PROD deployment approval from the relevant team, including a downtime slot.


πŸš€ Steps to Schedule a PROD Deployment

Let’s assume the customization was built in the Dev environment, the code was merged into the release branch, and the deployable package was uploaded to the Asset Library and already deployed on Tier 2.

1) Go to Tier 2 environment history in LCS by clicking environment changes.


2) Select the custom package you want to move to PROD. Click Sign off and mark it as a Release            Candidate.










3) Now open the PROD environment in LCS. Click Full Details → Maintain → Update Environment.


4) Select the Tier 2 environment from available sandboxes.  Let it load (may take a few minutes), then click on the package that was signed off and marked as the Release Candidate from step2.

Choose the deployment time slot and click Schedule.

 

⚠️ Don’t do these steps inside the VM, because the timing will follow the VM’s clock instead of the actual schedule.

5) If prompted, click confirm.













Now the PROD deployment has been scheduled successfully.

Deployment usually takes 1–2.5 hours depending on the customization.

Note: Check the PROD LCS page to see the schedule status. If needed, you can cancel the schedule before it starts. Once it begins, you cannot revert.












After deployment, if you made any entity changes (field addition/modification), don’t forget to refresh the entity list in PROD.

πŸ‘‰ This is all it takes to schedule a PROD deployment in D365 F&O.

Wednesday, August 13, 2025

Custom Sales Line Discount Calculation (Similar to Poland Localization) in D365 F&O X++



I recently had a requirement to calculate the Sales Line discount price in the same way as it is done for Poland localization.

If you’re not familiar with it, you can read Microsoft’s official documentation here: 

'Line discount calculation from the unit price for Poland - Finance | Dynamics 365 | Microsoft Learn'.

Technical Approach:

As per standard, the PriceDisc class, specifically the price2Amount() method, is responsible for calculating price amounts for Sales Orders, Purchase Orders, and Sales Quotations.

For Poland, the price2Amount() method is used to handle discount calculation.

Our goal is to reuse the same Poland logic for our custom requirement.

Steps to Implement:

  1. Create an Extension for the PriceDisc class.

  2. Write a Chain of Command (CoC) for the price2Amount() method.

  3. In the post-method CoC, duplicate the Poland logic and override the amount value.


Context Framework Usage

I used the disposable context framework to ensure:

  • The customization triggers only for Sales.

  • Added custom flag “Custom Sales Price Calculation” in AR parameter form/Prices tab to acts as an extra safeguard. You can turn it on only for the specific company where you want this customization to run, and keep it off for others. It’s also useful for quickly disabling the customization if something isn’t working as expected.


  • Create the context class with necessary variables and methods.

Plese refer this blog if you are not familiar with Context framework '(3) D365F&O. The magic of the Grabage Collection (GC) or story about Disposable Context | LinkedIn'

To initialize the context only for Sales:

  • Extend the SalesPurchLinePriceDiscCalculation class.

  • Override the calcPrice2LineAmount() method.

  • Initialize the context there and set the class variable as true, so the customization runs only for Sales Orders.

This is important because PriceDisc is used for both Sales and Purchase scenarios, and we don’t want

the customization to affect Purchases.

 

Testing Scenarios

Make sure you test both unit and functional cases to confirm the customization works and doesn’t impact other processes:

  1. Intercompany scenario

  2. Sales Return

  3. Sales Margin functionality

  4. Ensure Sales Quotations and Purchase Orders are not affected

Note: I have not tested this with Retail Sales Orders. Please validate this scenario if relevant to your environment.

Disclaimer: Please note that these suggestions are based on my personal experience and may not be the only solution. As always, thoroughly test any changes in your test environment before moving them to Production.

Wednesday, August 21, 2024

Post-PROD DB Restoration Steps

Hi Everyone, 

While many resources explain the process of performing a point-in-time restore from Production to Sandbox in Dynamics 365 FO, post-restore steps are often overlooked. This guide outlines essential actions to take after a successful database restoration. 

Steps:

  • Verify Data Integrity: Open a frequently used form to ensure that the latest PROD data has been copied to your UAT environment.
  • Enable User Accounts: After a restore, user accounts might be disabled. Navigate to the System Admin module, go to the Users form, and enable the necessary user ID’s.

        
  • Email batch job:  Enable the email distributions batch job if required.
  • Custom alerts: If the custom alters are configured in the production environment, disable it.
  • Email parameters: Remove the email parameter setting that currently points to the PROD environment and change it to point to the UAT.







  • This step is necessary if your system has integrated with third-party applications and may not be applicable to all users.

    1. Microsoft Entra ID: Change the Microsoft Entra ID application ID that points to the production environment to the UAT application ID.
    2. Azure Key Vault parameters: Remove the secrets, delete the key vault setups, and reconfigure them with the UAT values.
    3. BYOD: Ensure that your BYOD data source is configured to point to the UAT instead of the PROD. Replace the PROD application ID with UAT in recurring integration data projects(DMF). Set the recurring integrations batch job to "Waiting" status from "Withhold".
    4. Endpoints: Configure the business event endpoints if it's required.

  • Export backup: Once all the above steps are completed, export a database backup from the UAT environment. This backup can be used to restore the latest database to development machines.

How to Assign the Same Security Role to Multiple Users in Dynamics 365 Finance and Operations(D365 F&O)

Hello everyone,

We often encounter situations where we need to assign the same role to multiple users simultaneously. This frequently occurs when restoring the PROD DB to the UAT environment. By following these steps, you can easily assign the same role to multiple users.

1) Before assign the role, ensure all users are imported into the system. Navigate to System Admin > Users and click Import Users. This allows you to import multiple users simultaneously.

2) Go to System Admin > Security > Assign Users to Roles. Select the desired role and click the manually assign/exclude users button.


3) Select the specific users (multiple) you want to assign the role to. Click Assign to Role button to complete the process.

D365 Finance and Operation version upgrade process for Cloud hosted environments

Overview: Microsoft has made version upgrades mandatory in Dynamics 365 Finance and Operations. You are allowed to skip only one version du...