Microsoft Dynamics CRM 4.0 - Thought Repository

Thursday, December 10, 2009

Edit the Sitemap to Hide Navigation Tabs from Certain Users


Users of a CRM system can be spread across different departments and organizations. How can you control the navigation tabs on Microsoft CRM 4.0 so that the customer service department and marketing department only see the parts of CRM that they use? While there is no interface within the Settings navigation console to control this, you can hide tabs from groups of users by modifying the sitemap and security roles. If you are unfamiliar with modifying the sitemap, reading Micorsoft Sitemap Reference and article on modifying the CRM Sitemap will be helpful.

The sitemap is comprised of the xml tags Area, Group and SubArea which show up in the CRM as shown below.

For this example, I’ll go through the steps to hide the “Marketing” tab from customer service users. I’ll pretend that the Marketing tab consists of only the Account, Contact, and Leads entities and customer service does not have “read” access to Leads. You can remove the read access for users in Marketing by creating a security role called Marketing and removing the read permission as shown.

Next we export the sitemap and locate the section that corresponds to the Marketing Area. It looks something like this:
<Area Id="MA" ResourceId="Area_Marketing" Icon="/_imgs/marketing_24x24.gif" DescriptionResourceId="Marketing_Description" Title="Marketing">
   <Group Id="MA">
     <SubArea Id="nav_accts" Entity="account" DescriptionResourceId="Account_SubArea_Description" />
     <SubArea Id="nav_conts" Entity="contact" DescriptionResourceId="Contact_SubArea_Description" />
     <SubArea Id="nav_leads" Entity="lead" DescriptionResourceId="Lead_SubArea_Description" />  
   </Group>
 </Area>
We’ll want to split the Lead SubArea into its own group. This is due to the CRM sitemap rule that if a user that does not have privileges to all the SubArea’s within a Group, then the whole Area is hidden from the user. This is accomplished by adding a Privilege tag within our Lead SubArea. Splitting off Lead into a new Group will have no visible impact on the CRM. Newly created Groups that do not have a “Title” attribute will look exactly the same as if they were in the same Group. The modified code that will help us achieve this.
   <Area Id="MA" ResourceId="Area_Marketing" Icon="/_imgs/marketing_24x24.gif" DescriptionResourceId="Marketing_Description" Title="Account Management">
     <Group Id="MA">
       <SubArea Id="nav_accts" Entity="account" DescriptionResourceId="Account_SubArea_Description" />
       <SubArea Id="nav_conts" Entity="contact" DescriptionResourceId="Contact_SubArea_Description" />
     </Group>
     <Group Id="LEAD">  
       <SubArea Id="nav_leads" Entity="lead" DescriptionResourceId="Lead_SubArea_Description">  
 <Privilege Entity="lead" Privilege="Read" />
       </SubArea>
     </Group>  
   </Area>
Before uploading your modified sitemap back to your CRM, make sure you have a copy of the exiting sitemap as a backup in case anything goes wrong. After uploading the new sitemap, you can test it out by using Internet Explorer to impersonate another user. Once you have this simple example working, you can move on to creating entirely new custom tabs for the different departments in your organization.
Continue Entry»

View Comments

Friday, September 11, 2009

Shortcut to Email Contacts Using Outlook


While CRM 4.0 has a built in feature to email contacts, I've found it a bit less than intuitive for end users. When a user clicks the "Send Email" button in a Contact record, a new CRM form opens up giving them room to type in an email but also presents form fields for the CRM Email Activity. When the user types up the email and clicks send, if you haven't configured an email server for CRM, the email isn't actually sent off immediately. Rather, the user has to wait for their Outlook to sync with the CRM servers and send it out through their own inbox, which can cause some confusion. Some users would prefer to quickly shoot off a quick email using the familiar Outlook interface, without having to copy and paste the Contact's email address. By adding a custom ActionButton, this is a simple addition.

The javascript code below creates an ActionButton which I detailed in a previous post. The code has been modified to add the emailing functionality. I've used the attribute emailaddress1(Email) for this example.
//replace 'emailaddress1' with the name of your custom attribute, make sure you keep the '_d' ending
function loadjscssfile(filename, filetype){  
  if (filetype=="js"){  
    var fileref=document.createElement('script')  
    fileref.setAttribute("type","text/javascript")  
    fileref.setAttribute("src", filename)  
  }  
  else if (filetype=="css"){  
    var fileref=document.createElement("link")  
    fileref.setAttribute("rel", "stylesheet")  
    fileref.setAttribute("type", "text/css")  
    fileref.setAttribute("href", filename)  
  }  
  if (typeof fileref!="undefined")  
    document.getElementsByTagName("head")[0].appendChild(fileref)  
}  
//load some styles to display link image and hovering link image  
loadjscssfile("http://" + location.host + "/ISV/styles/openEmail.css", "css")  
  
var linkTD = document.getElementById("emailaddress1_d");  
var siteIMG = document.createElement("img");  
var siteA = document.createElement("a");

//create img overlay to show "Send Email to Contact" when icon is hovered and store javascript to open link  
siteIMG.style.width = "22px";  
siteIMG.style.height = "19px";  
siteIMG.setAttribute("title", "Send Email to Contact");  
siteIMG.setAttribute("alt", "Send Email to Contact");  
siteIMG.setAttribute("src", "http://" + location.host + "/ISV/styles/blank.gif");  //1x1 pixel blank overlay image  
siteIMG.style.visible = false;  

//create img  
siteA.setAttribute("href", "mailto:"+crmForm.all.emailaddress1.DataValue);  
siteA.style.position = "absolute";  
siteA.className = "openEmail";  
siteA.style.right = "2px";  
siteA.style.top = "4px";  
siteA.appendChild(siteIMG);  

linkTD.style.position = "relative";  
linkTD.appendChild(siteA);
The images and files used in the sample can be found here: Download Zip

Make sure to put these files in "C:Program Files\Microsoft Dynamics CRM\CRMWeb\ISV\styles" the ISV folder of your CRM 4.0 on premise install. By default, a 'styles' folder does not exist so please create one.
While this feature might seem trivial, every little bit helps in ensuring a great CRM experience!
Continue Entry»

View Comments

Friday, July 10, 2009

Update Rollup 5 released, Fix for Slow Loading Entity Forms


Update Rollup 5 was just released on July 2nd and is available for download. As with all Rollup Updates, I'm always curious to read through the list of fixes and see if any affect customizations made to my CRM system. It's always a good idea to test out the Rollup Updates for a few weeks on a development CRM server prior to deploying to production. You'll also want to impersonate a test user account to make sure user accounts with different roles and permissions are not affected.



Of particular interest in this Rollup is a fix for "slow performance and high CPU utilization [which occurs] when you import customizations in Microsoft Dynamics CRM 4.0" 956330. Any time I can cut down page load times is a boon to user experience and satisfaction. After installing the Rollup on my dev CRM system, I found page load times for my Account entity reduced from upwards of 30 seconds from a cleared cache, to less than 5 seconds. Highly recommended!
Continue Entry»

View Comments

Wednesday, July 8, 2009

On vCards and Quickly Creating Contacts in MS CRM 4.0


What's the most efficient way to create a new contact or lead in CRM 4.0 without having to manually enter them in? This is a common problem that all CRM users face. To add to the problem, these leads and contacts can come in a variety of formats including CSV/Excel files, vCards, Emails, or physical business cards. What's an end user to do?




CSV/Excel: Creating new contacts from CSV/Excel files is elegant and simple when you use MS CRM's built in import tool. After cleaning up your data file and ensuring the column headers have been set to CRM attributes, importing a bunch of contacts into CRM takes a matter of seconds. However it's very rare to have a list of contacts come in this clean package, unless you are migrating from a legacy system or importing leads from a lead generation system.



vCards: The electronic business card, otherwise known as the vCard, is a file format which has been around for years. A vCard ends with the vcf extension and can be attached to an email message or included as a link on a web site. Once a user opens up the vcf using Outlook, an Outlook contact record is created, which they can use to push to the CRM system by clicking the "Track in CRM" icon in the CRM Outlook toolbar. In Outlook, you have the option of setting up a vCard and have it attached to all emails you send out. Unfortunately, this adds overhead to every message you send out, since each message will include a vcf attachment and probably won't be too popular with people who are not familiar with vCards.

Emails: For my users, it seems like most new contacts come from email conversations with a company's employees. Typically, an user would then have to create a new contact record before he is able to track any communication from the contact. This involves manually copying and pasting the name and contact information for a contact from the email signature. I came across a very handy Windows program called Anagram, that allows a user to highlight a signature, press F12 and find a new Outlook contact record pre-populated with the contact's details. From here, it would be trivial to push the Outlook contact to the CRM system using the "Track in CRM" button. It seems like Anagram uses a frequently updated, intelligent regular expression to parse out a contact's signature to find what constitutes an address, a phone or fax number, or name and then passes those fields to an Outlook new contact template. From using the trial version of Anagram, I found the program very intuitive and great at what it advertises in accomplishing.

Physical Business Cards: Physical business cards are probably the second most common source of new contacts. To get around the menial typing in of details for each of these type of contacts, you can look into a business card scanner, such as this one made by CardScan. CardScan uses optical character recognition (OCR) technology to scan in a card and then translate them into Outlook contacts. However, at a price point of $149.99 per device, you will really need to consider the utility of the device and the volume of business cards you plan on scanning.

Looking towards the future, a new web movement called microformats adds semantic markup to HTML code, thereby allowing programs to automatically recognize a person's contact information or an address from what the end user perceives as plain text. The hCard microformat is of specific interest, as it uses the vCard spec as a wrapper for a person's contact info. As Outlook is the market leader in global corporate Email use(commanding 48% market share as reported by USA Today) if Microsoft decides to roll along with microformats and integrate it into future versions of Outlook, we could potentially have vCards embedded right into the signature of HTML emails. Then, when these email messages are tracked, using a CRM system, the CRM could automatically create a new contact record either through a workflow or some other mechanism that is abstracted from the end user.

If you've come up with any novel solutions for quickly creating new CRM contacts, please leave a comment!
Continue Entry»

View Comments

Friday, June 26, 2009

Code for CRM 4.0 Reading Pane Add-on

As promised, here is the code for the CRM Reading Pane add-on, albeit a bit later in the week than I would have hoped. For now I've chosen to attach the Visual Studio project as a zip file. Next week I'll look into putting it on a hosted revision control system.

To use the Reading Pane, you will need to open up the Visual Studio solution file and search for all instances of "MODIFY:" These will be areas of the project where you will have to change the code to reflect your own CRM server address, organization name, etc. In addition, you will need to modify your Account entity to create a new tab with an Iframe to host the Reading Pane. The settings for the Iframe are shown below.

Download - Code for Reading Pane


Continue Entry»

View Comments

Friday, June 19, 2009

Duplicate Outlook Reading Pane for MS CRM 4.0 Activities

CRMActivityReadingPane
Normally, when reading or searching for a particular CRM Activity, a user has to manually open up Activities one by one in new popup windows. This can turn into a very aggravating experience as system resources must be allocated to open each new window, leading to a delay in rendering each Activity. What if you could read and page through the Activities of an Entity similar to the reading pane in Outlook?


ActivityPopups
In next week's post I'll show you how to bake a C# ASP.net page, blend in a TSQL query, and sprinkle some javascript spice to treat your users to an enhanced Activity searching and browsing experience. I've deployed this Activity Reading Pane feature to my company with great success! Users have marveled at the newfound ease of searching within the Activities of a particular Account or Contact. See you next week.

Update: Here is the code.

OutlookReadingPane
Continue Entry»

View Comments

Monday, May 18, 2009

New Blogger Template

Last Friday I deployed a new blogger template. The base template is called Daily Inspired and is created by Antonio Lupetti, author of the popular design blog Woork. This clean looking template provides more functionality than the default template I was using before and aids in readability. Continue Entry»

View Comments

About Me

Henry Bow
I'm a programmer living in sunny Orange Country, California. Since the beginning of 2008, I've been developing on the MS Dynamics CRM 4.0 platform. This blog will help me jot down some of the tips and neat features I've developed along the way while giving me a chance to dabble into the curious world of analytics and SEO.

Please let me know if I can help with your CRM needs.
hbow27@gmail.com

Feed Rss

Subscribe to new posts via e-mail

Recent Posts