Microsoft Dynamics 365 Blog

Sometimes I link send direct links to other CRM users. I don’t always have the outlook client installed (I’m always upgrading, using a different version etc etc) and therefore an unable to take full advantage of the regarding feature.

Here is a tiny bit of Jscript you can add to your ISV.config. It allows you to copy the URL of a record’s form to the clipboard:

<Button Title=Copy Link ToolTip=Copy Link Icon=/_imgs/ico_18_entityInfo.gif JavaScript=var copy = window.location.href; window.clipboardData.setData(‘Text’, copy); AvailableOffline=false />

The code copies the URL to a variable and then pastes it into the clipboard when the user clicks the Copy Link button. Thanks to IE’s security clipboard security feature a user will be prompted to allow or deny access to the clipboard. The prompt is necessary as window.clipbardData.setData has a dark twin: window.clipboardData.getData which can read your clipboard (great for stealing all kinds of stuff). The warning can be turned off in IE7’s settings: however I strongly recommend that you always leave it on.

Ensure you check out the ISV.config documentation if aren’t familiar with adding custom buttons to CRM.

Philip Richardson

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!