Most organizations use Dynamics CRM to track their Accounts and Contacts, but they also track other companies with whom they work. It’s common to use the Relationship Type field on the Account to indicate that a company is a Partner, Consultant, Investor or Vendor. That way it is easy to create a View that filters the data based on the type of Account. But wouldn’t it be great to have its own menu item on the left navigation in CRM? By modifying the site map and adding some parameters from a View, we can accomplish this task!
In this example, we are going to use the Account entity and the out-of-the-box relationship type field.
1. Create a new View that will have filter of relationship type = Vendor. This can be a System View (recommended) or a Personal View. If you do use a Personal View, make sure you share the View with the appropriate user who will need to have access to this menu.
2. Once the view has been created and published, we need to grab a couple of pieces of information. Go to the Accounts entity and pull up the view that we created in step 1. Select the Copy a Link and select the Current View option.
3. Now copy that link to a notepad, as we will need some information from that link. Below is an example of what it would look like.
Active Vendors <https://crm.yourdomainhere.com /xyz.aspx?etc=1&extraqs=%3fpagemode%3diframe%26sitemappath%3dWorkplace%257cCustomers%257cnav_accts&pagetype=entitylist&viewid=%7bDFBDFC4E-1781-E211-BC15-000C298A36A7%7d&viewtype=4230>
4. The next step is that we need to export the existing site map. Go to Settings, Customizations and Solutions. From here, you can create a new solution. Provide a display name, publisher and a version. Then click Save.
5. After the screen refreshes, we can select the “Add Existing” and then select the site map. Once the site map has been added, we can select “Export Solution” from the top menu. That will walk you through a wizard and allow you to save that solution to your local PC.
6. Locate the solution file we exported in the above step, and extract files that are included in the zip file.
7. Find the Customizations.xml file and open this file in Notepad, Notepad ++ or Visual Studio. (If possible, Visual Studio or Notepad ++ are the best program to make these changes.) This will give you the ability to make sure there are no errors in your XML file before uploading it back to CRM.
8. In this example, we want the new menu item to be displayed under My Work and under the sub-section of Customers. In the customizations.xml file, find a Group ID of “Customer”.
9. Copy the information below to the XML right below the SubArea for Contacts.
<SubArea Id=”new_vendor” Url=”/_root/homepage.aspx?etn=account& viewid=%7bDFBDFC4E-1781-E211-BC15-000C298A36A7%7d&viewtype=1039″>
<Title LCID=”1033″ Title=”Vendors” />
10. Let’s now look at what needs to be updated in the string above to look at your specific information from CRM.
- Etn = account
- Here we specify the entity that we are pulling the view from. Since we are using the account entity in this example, we can leave this as is.
- Viewid= the GUID of the view
- Viewtype = this will be one of two options.
- For system views enter in 1039
- For Personal views enter in 4230
This will be the name that appears in the Site Map. This can be changed to display whatever value you would like to have displayed.
<SubArea Id=”new_vendor” Url=”/_root/homepage.aspx?etn=account& viewid=%7bDFBDFC4E-1781-E211-BC15-000C298A36A7%7d&viewtype=1039″><Titles>
<Title LCID=”1033″ Title=”Vendors” />
11. Save your customizations.xml file and create a zip file that includes all three files that were extracted in Step 6.
12. Now it is time to upload the solution to CRM. Go to Settings, Solutions and select Import.
13. Browse to the zip file we created in step 11 and walk through the Solution Wizard. Once the import finishes, select the Publish All Customizations. When that has finished, refresh your browser by clicking the refresh button or F5.
14. Once your screen refreshes you will now see a new menu item called Vendors.
A filtered view like this is just one of many examples of modifying the Site Map to make your Dynamics CRM more user friendly. If you are not familiar with XML code or need assistance in modifying your Site Map, contact PowerObjects and they will be than happy to assist you.