How to "properly" get a record URL inside Dynamics CE
A couple of days ago I published a piece on Dynamics Chronicles on how to get a record URL to use it, for example, inside a Power Automate Approval Flow. However, this approach has one weakness. If you use more than one app, for example for working on opportunities, the URL was not app-specific! This can indeed be a problem if you develop a new app, but the users still use the legacy one.
Therefore I kept looking and found a very interesting blogpost of Andrew Butenko that shows how to do exactly that - bypass this weakness! So I thought it might be worth writing a short update here. Inside the post you get to the github repo that Andrew thankfully provided (thanks dude for that!!)
So as described in the post you can use his solution. I did exactly this to check if it works. For now, I created a field on the "Opportunity" entity in Dynamics CE, as well as a new App to get a second, and completely new, app to use the "Opportunity" entity on. I did this to check if, even if I have the standard "Sales Hub" open, a click on the record would lead me to the new App.
First, I created the workflow as described and used the output to overwrite my URL field on the Opportunity:
Now after this is done, we can check if the record URL is in fact correct. To do this I wrote the URL to a field and put in on the Opportunity form:
领英推荐
So far so good. Now, the URL does not look 100% identical??! You know what? I do not care as long as it works! So I took this URL, put it inside an approval flow, closed my Testapp ... and then clicked on the link that I used inside an Approval Flow:
And now a click on the hyperlink brings the user to the correct record in the correct app:
And yeah that is about it. Hope you can make use of this at one point or another. One thing has to be mentioned however. If this approach is used, you use Code that you have not written and compiled yourself! In my perspective this is not a reason to not use this solution. The code is all on github and one can have a look into it. However in some very restricted settings (large banks etc.) this could be a thing to consider. Cheers.