Navigating to UCI from Record URL (Dynamic): A Custom Code Solution

Introduction

This blogpost aims to aid users with a common problem that has surfaced recently with Microsoft Dynamics CRM supporting two interfaces. In this blog, we will explain how users can navigate to the UCI from Record URL (Dynamic), through a custom code solution.

Background

Dynamics CRM provides Out of the Box (OOB) functionality to automate processes like Create, Update, Assign a Record, Send an Email, Change Status, Perform Action or Start or Stop a Workflow. Furthermore, a custom code can be used to perform activities that are not provided by OOB functionality using the Custom Workflow Activities.

The Send an Email feature is one of the most important features of OOB workflow as it interacts with the outside world! When we talk about the outside world, we do not simply mean external users, we also mean users who are associated with Lead, Opportunity, Contacts, Account, Queue, Team, etc.

Common scenarios used for sending an email from Dynamics include notifying users whenever a new record is created or assigned to the user. This allows the user to get regular notifications about ongoing developments and helps keep track of important highlights. Usually, the email is equipped with a link that navigates the user to the record directly, saving time and simplifying the process.

Currently, Microsoft Dynamics CRM is supporting two interfaces i.e. Legacy web client and Unified Interface (UCI). However, recently Microsoft’s official documentation announced that as of September 2019, the legacy web client is deprecated and the users should transition to Unified Interface before October 1, 2020. This means that all users and developers will need to adapt to the new changes and move to UCI as soon as possible.

Problem Scenario

This change is not simple and has created a few problems for the users. For example, a common problem faced by the user is that the record URL denoted by Record URL (Dynamic) in CRM still points to the legacy web client (old interface). This means that when the users click on the Record URL hyperlink, they are navigated back to the record in the legacy interface, even though they only have a security role to model-driven apps (UCI interface).

This is an important issue that can breach security and can confuse the users. Furthermore, no support is provided by Microsoft regarding this issue yet. In this blog, however, we will solve this problem through a custom code solution.

The Custom Code Solution:

The record can be viewed inside UCI by concatenating the App ID of the model-driven app with the Record URL. Since none of the out of the box solutions provide a way to concatenate the data, we have made a custom workflow that takes 2 inputs (Record URL (Dynamic) and App ID) and creates a new URL for this purpose. This new URL will point the users to the new interface (UCI).

Step1: Obtain App ID

Open the model-driven app and the 32-bit character long string ID will be visible in the URL (between = and &). Note it for future use.

Open the model-driven app

Step 2: Create a Custom Workflow Activity and register it

Create Custom Workflow Activity

The App ID should be concatenated with the Record URL (Dynamic) using the following code. The output URL can now be used, instead of Record URL (Dynamic), to view the record in the model-driven app (UCI) according to the App ID provided.

Step 3: Use the activity in OOB Workflow and set the input parameters

Add the Workflow from Step and Set Properties to add input parameters

OOB Workflow Properties

OOB Workflow set Properties

Step 4: Add the remaining OOB Workflow steps and activate the workflow.

OOB Workflow steps

Here is a sample of the email composed. We added the old URL as well as the new URL for comparison. To add the URL in the Email, click on Insert Hyperlink

new URL for comparison

Please note:

The field in URL is Record URL (Dynamic) from Account entity, which is the OOB field that takes to the user to Legacy web client record.

Legacy web client record

Please note:

The field in the URL is Output URL from Custom Workflow Activity: CreateUCIURL that we created in step 2. This is the custom output field that points to the UCI record.

UCI record

Here are the results from the dynamics user2 inbox.

Results dynamics user inbox

The old URL navigates to the record in Legacy web client

record in Legacy web client

The new URL navigates to the record in the Model-driven App.

record in the Model-driven App

Additionally, the workflow can be easily customized to meet any business requirements such as controlling the record viewership in any app depending on any number of input parameters like a business unit, user, etc.

Conclusion

There you have it! You have opened a Dynamics CRM record in UCI from a link using Record URL! No more confusion for the user! We have provided a step by step solution for you. If you have any questions or insights about this blog, feel free to reach out to us!

3 thoughts on “Navigating to UCI from Record URL (Dynamic): A Custom Code Solution”

  1. If a customer has the portal installed, then the ADX solution includes a custom step already that does this – at least grabbing the GUID. Can circumvent the trivial task of ‘developing’ one.

  2. Hey D M, So you are suggesting to install ADX solution for just to grab the GUID, right? And what if some customer don’t need to have portals and this ADX solution installed?

  3. D M,

    Thank you for your kind suggestion. However, our solution is independent of any add-on (ADX portal) right now. I’m sure, not only ADX solution but other add-ons might have such solutions already implemented to avoid code.

    Regards,
    BOLDEnthusiast,

Leave a Reply

Your email address will not be published. Required fields are marked *