Setting Up the Browser Favorite
- Open up an entity form and then press Ctrl+N to open the form in a new window that has the address bar showing.
- Add that current page as a Favorite
- Edit the properties of the Favorite. On the General tab, type "Show GUID" as the shortcut's name. On the Web Document tab, provide the JavaScript shown below.
javascript:(function() {var d=document.URL;var s = d.search(/id(%)3d(%)257b[A-F0-9]{8}(?:-[A-F0-9]{4}){3}-[A-Z0-9]{12}/);window.prompt('Record ID:',d.substring(s+10, s+46))})();
- Click OK to save the Favorite.
Using the Favorite to Show an Entity Record's ID
- Open an entity form.
- Press Ctrl+N to open a new window that shows the Favorites bar.
- Click the Favorite to show the record's ID.
Hey, this is cool, thanks. It's very helpful for stripping a Guid from any URL in a browser. Can add 'a-z' (lowercase) to all the character classes in the regex so it will work with lowercase, too.
ReplyDeleteInstead of showing message box, it's possible to copy the GUID directly to clipboard using this code:
ReplyDeletewindow.clipboardData.setData("Text", guidValue);