Bhoopathi

"Be Somebody Nobody Thought You could Be"

Monday, May 15

Create a "Bookmark" to Show "Schema_Name" of MS CRM Attribute Name

In today’s blog, we’ll show our Internet Explorer users how to create a “Favorite” (aka bookmark) that will display the schema name for a CRM field.
Step 1: Creating the “Favorite” in IE
Navigate to any page in your IE browser. (Literally, you can navigate to any page you want, because you’ll be changing the file path later in the process.) In the example below, we went to www.google.com.
Click Alt-Z to bring up your Favorites menu and select “Add to favorites…”
The “Add a Favorite” pop-up window is now displayed. In the “Name:” box, type Show Schema, as shown below:


In the “Create in:” box, select “Favorites Bar,” as shown below:

Click Add. You should now see “Show Schema” in your Favorites Bar, as shown.

– If your screen looks like the screenshot above, move on to Step 2.
– If you’re not seeing your Favorites Bar, we need to display it. Easy-peasy! Here’s how:

Right-click in the white space at the top of your browser, as shown below:
Select “Favorites bar” from the menu. That’s it!
Your Favorites bar should now be displayed, including “Show Schema.”
Step 2: Changing the properties of the Show Schema “Favorite”
In this step, we’ll change the functionality of the Show Schema “Favorite.” If you click Show Schema right now, it will, of course, bring you right to www.google.com (or whatever page you used in Step 1). But we want the button to show us the schema names of CRM files, right? Here’s how we do it:

Right-click Show Schema to display the pop-up menu shown below, and select “Properties.”
In the “Show Schema Properties” pop-up window, on the “Web Document” tab, the “URL:” field will be displaying whatever URL you were on when you created the “Favorite” – in our case, that’s https://www.google.com/?gws_rd=ssl. Erase it!
Copy the text below (verbatim!) and Paste it into the “URL:” box.
javascript:function getFrame() {var $iframe = $(‘#crmContentPanel iframe:not([style*=”visibility: hidden”])’);if ($iframe.length > 0 && $iframe[0].contentWindow.Xrm.Page.ui) {return $iframe[0].contentWindow;}else {return null;}}var frame = getFrame();if (frame == null) {alert(‘Please make sure you are on an entity form and try again.’);}else {frame.Xrm.Page.ui.controls.forEach(function(a){a.setLabel(a.getName())});}
Note that this step is optional, but we recommend it simply because it’s nice to have a unique icon for this “Favorite.” With that in mind, click Change Icon…
In the “Change Icon” pop-up window, click on the icon of your choice and then click OK to close the window.
Click OK on the “Show Schema Properties” window to close it.
Your Favorites bar should now reflect the changes you just made, including the new icon. If the new icon is not displayed, simply hide the Favorites bar and then re-display it – that will refresh the properties.
Step 3: Seeing the Show Schema button in action
To see how it works, you will need to be logged into CRM and on a Matter record. Also, you will want to select the “Document Generation” from the “MATTER” dropdown menu, since most of the fields you’ll want to put on your documents are contained within this form. See below:
You will see that all of the fields displayed are showing the labels for the fields, as in the screenshot below:
But wait, you wanted to see the schema names (not the field labels) so that you can figure out what field to add to your documents, right? Well, here’s where the magic happens. Click Show Schema and… voila!
Pretty slick, no? Oh, and one thing to remember: in order to display the field labels normally again, you simply need to refresh your screen. Happy CRM’ing, friends!