Link to Dynamics 365 records in UCI

Scope

With the UCI getting used more and more, some have already noticed that the record links that can be inserted into e-Mails generated from workflows lead to the refreshed UI instead of the UCI.

In this post we’ll take a look on how to adapt links to point directly to UCI.

Getting started

First you’ll need the XTL solution. The installation is described in a previous post: Advanced Dynamics CRM E-Mail Templating.

Create the XTL execution step for creation of e-Mails as described in above post.

Finding your UCI appid

Now open your UCI and check the url.

It will contain a query string with a parameter appid=[YourAppId]. Save it for later.

Inserting the UCI link in your e-Mail

Now open the e-Mail template where you want to insert the link.

You can add it by using a XTL placeholder. Usually you’ll want to send a link pointing at the regarding object of your e-Mail, which can be done as follows:

${{ RecordUrl ( Value ( "regardingobjectid"), { appId: "YourAppId", linkText: Value( "regardingobjectid.name" ) } ) }}

When you create the e-Mail, the XTL step that you configured at the beginning will find the placeholder and replace it with the link which also contains the proper appid. When clicking on this link, the record will open directly in UCI.

Be careful, the IDs might not be the same across organizations. You’re not limited as to what record your URL points to. Study the Value function on GitHub and you’ll see, that you can jump across entities using the dot separator or even use a fetch and point to the results.

Leave a Reply

Your email address will not be published.

RELATED POST

HTML E-Mails with place holders in Dynamics 365

Scope E-Mails in CRM are very simple by default. But what if we want to have styles in them by…

Advanced Dynamics CRM E-Mail Templating

Scope Often customers have extended requirements for their mailing purposes. Not only do they often need a lot of information…

Generating salutations for CRM contacts

Scope In this blog post I'm going to show you how to easily generate salutations for contacts inside your Dynamics365…