Plug your first UDE Box

so in a previous post I have briefly discussed the Unified development environments , lets see how we can provision the one.

Unified development environment is pre-requisite for many of the new development scenarios that Microsoft has released or are in preview for example co-pilot based extension and AI plugins do require a UDE box

Appropriate Licenses

First you must have an appropriate license assigned to your user to provision the environment.An example license is Dynamics 365 Finance or Dynamics 365 Supply Chain Management for customers, and Dynamics 365 Operations Application Partner Sandbox for partners and ISVs.

The following table shows the mapping between various finance and operations apps licenses and their template details

LicenseTemplate nameTemplate IDComments
Dynamics 365 FinanceFinance (preview)D365_FinOps_Finance
Dynamics 365 Supply Chain Management (preview)Supply Chain Management (preview)D365_FinOps_SCM
Dynamics 365 Project OperationsProject Operations Integrated (preview)D365_FinOps_ProjOps
Dynamics 365 Operations Application Partner SandboxProject Operations Integrated (preview)D365_FinOps_ProjOps
Dynamics 365 CommerceCommerce (preview)D365_FinOps_CommerceThis template is available only for trials.

You must have at least 1 gigabyte of available Operations and Dataverse database capacities as per documnetaion but an environment provision with Demo data consumes somewhat around 5 GB of dataverse and 6 GB of FinOps capacities.

PowerShell commands

Open your PowerShell console application, and run the following commands to generate the environment.

#Install the module
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell

Write-Host "Creating a session against the Power Platform API"

Add-PowerAppsAccount -Endpoint prod

#To construct the json object to pass in
$jsonObject= @" 
{ 
 "PostProvisioningPackages": 
 [ 
 { 
 "applicationUniqueName": "msdyn_FinanceAndOperationsProvisioningAppAnchor", 
"parameters": "DevToolsEnabled=true|DemoDataEnabled=true" 
 } 
 ] 
} 
"@ | ConvertFrom-Json

# To kick off new environment Provisionment
# IMPORTANT - This has to be a single line, after the copy & paste the command
New-AdminPowerAppEnvironment -DisplayName "MyUniqueNameHere" -EnvironmentSku Sandbox -Templates "D365_FinOps_Finance" -TemplateMetadata $jsonObject -LocationName "Canada" -ProvisionDatabase

similarly you can delete the environment with below command

#Remove the previously created environment by ID
Remove-AdminPowerAppEnvironment -EnvironmentName [Guid]

Now setup visual studio to connect with the environment

After installing the Power Platform Tools extension for Visual Studio, follow these instructions to connect Visual Studio to your unified developer-focused environment.

  1. Launch Visual Studio if not already running.
  2. In the Tools menu, select Connect to Dataverse or Download Dynamics 365 FinOps assets.
    • Connect to Dataverse only downloads assets if not downloaded earlier.
    • Download Dynamics 365 FinOps assets always downloads.
  3. Select the desired options in the dialog and select Login.If you need to use another account or a different online environment, don’t choose to use the signed-in user. Enter the credentials for your developer user account with access to the online environment.
  4. Select an available solution in the dialog, and then choose Done.
  5. Find the sandbox environment created for online development in the list of Dataverse environments and connect to it.

If you are logging in to an online development environment in a tenant different from your own, where your user principal name (UPN) is added as a guest, update Visual Studio > Tools > Options > Power Platform Tools and select Skip Discovery when connecting to Dataverse and uncheck all the boxes on the login pane. You will be prompted to provide the Dataverse uri.

After installing the Power Platform Tools extension and connecting to the unified developer environment, you’ll be presented with a dialog to download the finance and operations Visual Studio extension and metadata.

Extension and metadata download dialog.

It can take around an hour or more depending on connection speed to download all the required asset

Downloaded assets can be found in the following location:
C:\Users\<User>\AppData\Local\Microsoft\Dynamics365\<ApplicationVersion>

The following files are downloaded:

  • DYNAMICSXREFDB.bak is a backup of the cross reference database.
  • Microsoft.Dynamics.FinOps.ToolsVS2022.vsix is the Finance and operations extension.
  • PackagesLocalDirectory.zip is the System metadata.
  • TraceParser.msi Learn more about Trace Parser.

Install the finance and operations extension

Using Windows File Explorer, from the folder C:\Users\<User>\AppData\Local\Microsoft\Dynamics365\<ApplicationVersion>, open the Microsoft.Dynamics.FinOps.ToolsVS2022.vsix file to install the extension.

On first start of Visual Studio after updating/installing the Microsoft.Dynamics.FinOps.ToolsVS2022 VS extension, you will be prompted for elevated permissions.

Debugging

If you want to attach the debugger to the running AOS process in the unified environment use Dynamics 365 > Launch debugger.

Deploy to the cloud

For this operation, use the Extension > Dynamics 365 > Deploy > Deploy Models to Online Environment menu item

Connecting Multiple unified development environments

 developer machine can be used to connect to multiple unified development environments. However, an instance of Visual Studio can at any time be connected to only one environment and have only one metadata configuration active.

You can switch the active configuration using the menu item Extensions > Dynamics 365 > Configure Metadata

change the environment you’re connected to.Tools > Connect to Dataverse

The current configuration and the current connection together determine what gets deployed and to which environment.

Currently supported operations

Provision a new environment with an ERP-based template

Install the Finance and Operations Provisioning app

Update the Finance and Operations(version Upgrade)

Copy a LCS environment to a unified environment(Production data to UDE )

Perform a transaction-less copy between environments( to reduce overall size and then selected number of transactions could be imported via data management framework

Limitations

DB restore in not available , you need to copy the full environment

Leave a Reply