2
votes

I've been tasked with creating a workflow in Dynamics 365 which can send emails (the easy bit). However, the email has a link to the record (also easy using the Record URL(Dynamic) attribute). However, we use Apps in our Dynamics instance and the link generated by the workflow using Record URL(Dynamic) doesn't include the app id and so when users click the link they are taken to Dynamics but are now outside the app.

My question is, is there a supported way to appending the App Id to the Record URL(Dynamic) attribute?

I've already searched for answers to this and cant find any. My solution was to create an Action which takes as input the Record and app ID, appends them and outputs them as an output parameter. This works to be honest, but I'm wondering if I'm reinventing the wheel and there is an easier way to achieve this.

Thanks and hope this helps anyone else with the same issue.

2
Really good catch. You can suggest an idea here experience.dynamics.com/ideas/list/…Arun Vinoth
Thanks for the idea. If anyone wants to upvote this idea, then go and vote here. experience.dynamics.com/ideas/idea/…Andrew N
Or you can use the Dynamics365 workflow tools and use the new Get App Record URL feature.user11029068

2 Answers

1
votes

We can get the Application ID from Xrm.Utility.getGlobalContext(); The application ID is one of the properties that returned

var globalContext = Xrm.Utility.getGlobalContext();
globalContext.getCurrentAppProperties().then(
    function success(app) { console.log(app.appId); }, function errorCallback() { console.log("Error"); });

For more details refer to Here

0
votes

While we are waiting for MS to give the OOB option to choose Model driven app Id & embed in Record url of WF, I recommend you to follow Andrew Butenko’s workaround using Ultimate Workflow Toolkit to achieve it with no code.

This is basically using UWT custom step to append App Id with Record url on the fly.