8th April 2010

Microsoft CRM 4.0 Filtered Lookups

Apparently CRM 5.0 will natively support filtered lookups; however, for CRM 4.0 there is an excellent plug-in available at http://mscrmfilteredlookup.codeplex.com/.  To use it follow these steps:

  1. Go to the Source Code tab, http://mscrmfilteredlookup.codeplex.com/SourceControl/list/changesets
  2. Download the source code and unzip somewhere on your disk.
  3. Use Visual Studio to compile the code.
  4. Register the plug-in following the steps listed in the readme file that comes with the download.
  5. Add simple JavaScript code to any entity you want to have filtered lookups.  Readme file explains the JS.

I tested this plug-in and it works great and is really easy to use. 

Note: You will need access to Visual Studio and to the Plug-in Registration tool to be able to do this.  At the time of this post the only thing you could download was source code, not any dlls.

posted in Microsoft Dynamics CRM | 5 Comments

8th October 2009

How To Link To Microsoft CRM Reports In Run Mode

Most all items in Microsoft Dynamics CRM 4.0 are URL addressable.  If you run a report, copy the URL, and then send the URL to someone when they click it the report will open on the Report Filter page and they will still have to click Run Report to see the report.

To have the report automatically run when the URL is clicked change the query string parameter action from filter to run.

For example, instead of:

https://crm.ryandev.com/crmreports/viewer/viewer.aspx?id={DD6204B8-1514-DD31-9ED5-050C25C4FE07}&helpID=Top%20Knowledge%20Base%20Articles.rdl&action=filter

do:

https://crm.ryandev.com/crmreports/viewer/viewer.aspx?id={DD6204B8-1514-DD31-9ED5-050C25C4FE07}&helpID=Top%20Knowledge%20Base%20Articles.rdl&action=run

posted in Microsoft Dynamics CRM | 0 Comments

5th October 2009

How To Include A Custom View In The Site Map In Microsoft Dynamics CRM 4.0

Adding any view, including custom views, into the Site Map in Microsoft Dynamics CRM is very easy to do.  Perhaps you have created a view that you want people to have easy access to or maybe you are trying to setup the navigation in a way that your users will best understand.   

Since everything in Microsoft CRM is URL addressable the first step is to determine the URL of the view you want to add to the Site Map.  To do this, navigate to the view in CRM, click on More Actions, Copy Shortcut, Of Current View as shown in the screen shot below.

sitemap1.jpg

Depending on your browser version and settings, you will likely get a prompt warning you that CRM will be accessing your clipboard.  Click Allow Access.

sitemap2.jpg

The URL of the CRM view is now on your clipboard.  Paste the URL into NotePad for use in a few moments.

Now you need to export the Site Map from Microsoft CRM so you can make the change and then re-import the Site Map. 

Click Settings, Customization, Export Customizations.

sitemap3.jpg

Select the Site Map from the list and click Export Selected Customizations.

sitemap4.jpg

Click OKto Microsoft CRM’s message.

sitemap5.jpg

You will then be prompted to save a zip file that contains the Site Map.  Click Save.

sitemap6.jpg

Name the file SiteMap.zip and save it somewhere on your computer such as your Desktop.

sitemap7.jpg

Unzip SiteMap.zip and open customizations.xml in NotePad.  Now, either add the URL you copied earlier to an existing entry in your site map or add a new sub area wherever you want it to be displayed in your Site Map.  The SubArea will look like the following:


<SubArea Id=”UniqueID” Url=”/../_root/homepage.aspx?etc=1&viewid=%46b5CC8A38-2374-DD11-955C-000C29ECA931%7d” Title=”My Custom View” />


Note: The URL that was copied from CRM earlier will need slightly modified.  After the “?” in the url you will see the ampersand “&” right before viewid.  You will get errors trying to import the customizations back into CRM because of the incorrect XML syntax.  You will need to replace the “&” with “&” to be able to import.Second Note: You will want to use a relative url meaning that you remove the http://servername/ portion from the url that was copied earlier.  This is important so that Microsoft CRM in offline mode will still work. Third Note: Please refer to Microsoft documentation for help with specific syntax within the Site Map XML file.Now, all you have to do is import the customizations back in to Microsoft CRM.  Go back to Settings, Customization, and choose Import Customizations. 

sitemap8.jpg

Select the file you saved.

sitemap9.jpg

Click Upload and Microsoft CRM will read in the XML file and will display a list of all entities available to upload.  Select Site Map and click Import Selected Customizations.

sitemap9b.jpg

Click OK to CRM’s prompt.

sitemap10.jpg

Note: Unlike importing most other customizations, there is nothing to Publish after importing the Site Map.  To see your changes you may need to refresh IE by pressing Ctrl+F5 or sometimes you even have to clear out your history to see the changes take effect.

posted in Microsoft Dynamics CRM | 6 Comments

17th June 2009

Use relative URLs in SiteMap in CRM when possible

When possible you will want to use relative URLs instead of absolute URLs in your SiteMap.  For example, if you want to link to a custom view from within your SiteMap you would select the View as normal, click on More Actions and choose Copy Shortcut, Of Current View.  However, this will copy into your clipboard the entire URL including http://crm.somesite.com/

The problem with including the entire URL is that the Outlook client will not work when you go into offline mode even though the URL is actually pointing to a view within CRM.   So, instead of doing something like http://crm.somesite.com/_root/homepage.aspx?etc=1&amp;viewid=%7b3B3A7E9E-653E-DE11-A323-000C29ECA927%7d you would instead use /../_root/homepage.aspx?etc=1&amp;viewid=%7b3B3A7E9E-653E-DE11-A323-000C29ECA927%7d. 

posted in Microsoft Dynamics CRM | 1 Comment

16th April 2009

How To Include Inactive Records In Microsoft CRM 4.0 Quick Find

Microsoft CRM 4.0 Quick Find is a great feature.  It allows you to quickly search for records without the need to go through Advanced Find.  Where Quick Find lacks is in the ability to modify the filter.  For example, Quick Find will only search for active records.  For some entities this may be OK but often when searching for Accounts or Contacts you may want to include inactive records.

quickfind1.jpg

Unfortunately Microsoft CRM 4.0 does not have a supported method for including the inactive records.  The customization window does not allow for modifying the filter criteria of the view.

quickfind2.jpg

There is; however, an easy unsupported way of including inactive records. 

1. Click on Settings, Customization, Export Customizations.

quickfind3.jpg

2. Select Account (or whichever entity you want to modify) and click on Export Selected Customizations.

3. Click OK to the warning window.

quickfind4.jpg

4. Click Save on the File Download window.  Save the file somewhere on your desktop.

quickfind5.jpg

5. Extract the Customizations.zip file and then open the Customizations.xml file in NotePad.

6. Search for “Quick Find Active.

quickfind6.jpg

7. Remove the filter condition as shown in the screen shot below.

quickfind7.jpg

8. Save the XML file.  Back in CRM, click on Settings, Customization, Import CustomizationsBrowse to the modified XML file and click on Upload.  This will read the XML file to determine what customizations are contained in it.  Make sure Account is selected and choose Import Selected Customizations.

quickfind8.jpg

9. Lastly, publish the changes.  Click on Settings, Customization, Customize Entities.  Select Account and click on Publish.

quickfind9.jpg

Note: This is an unsupported method; however, it will work on any of the entities including custom entities. 

posted in Microsoft Dynamics CRM | 26 Comments

11th March 2009

Update to the CRM Audit Plug-in tool

There is a problem with the audit entity from my original post that is causing an error when using the plug-in.  Please download the updated copy here.

Also, I have created a more packaged version of this which is available from http://blogs.engage2day.com/?p=90.

posted in Microsoft Dynamics CRM | 0 Comments

17th December 2008

Microsoft Dynamics CRM Audit Plugin Tool

Database auditing tools are extremely valuable when you need to be able to determine who made a certain change or when trying to figure out how a particular value was set.  Microsoft Dynamics CRM does not have any native auditing beyond storing who created a record and who modified it.  There is no way to see which fields have changed and what their previous values were.

However, we can easily create our own auditing plugin tool and easily audit all fields or just specific fields for specific entities.  Note: All code samples and documentation contained in this post assume that you have access to the CRM server directly, that the user account running the CRM Async Service has permissions to read the registry on the CRM server, and that the Prefix in the Customization tab in System Settings is the default “new.”

First of all, we need an entity to store the audit records.  We could store the audting records in their own SQL database; however, we have chosen to store the records in CRM so that we can use native features of CRM to find data, such as Advanced Find and CRM Reports.  Download the custom audit entity here.  Refer to CRM documentation on how to import and publish the custom entity.

Secondly, we will store a few configuration settings in the registry on the CRM server.  Download the .reg file here and make the necessary changes to it before you import it into your registry.

Lastly, we need to register the plugin. We have used the free plugin developer tool that comes with the CRM SDK and it can also be downloaded in its compiled version at the end of this post. You can download the source code for the plug-in here and screen shots are below.

Steps to register the plugin


Step 1: Register the .dll file.
CRM Audit Plug-in 1

Step 2: Browse to the .dll file and then register the AuditPlugin class into the database.  Note, it is best to do this directly on the CRM 4.0 Application server.
crmaudit2.jpg

Step 3: Plugin should register successfully.  If you get any errors, refer to CRM support forums for troubleshooting suggestions.

crmaudit3.jpg

Step 4: Register a Create step.  Fill in the form as shown in the screen shot below.  As you are typing you will notice that there is some auto-suggest or intellisense built-in.  As shown in this example, we are registering the Audit Plugin to run anytime an account is created in CRM and the audit plugin will have access to all attributes on the account record that is created.

  crmaudit4.jpg

Step 5: After creating the Create step your screen should look like the following.

crmaudit5.jpg

Step 6: Register the Update event.  As shown in the screen shot below we are telling CRM we want our plugin to run any time any attribute on an account record changes.  What will happen is each time a user clicks Save or Save and Close on an account in CRM, if any of the attributes have changed they will be passed to our audit plugin which will create audit records in CRM.

crmaudit6.jpg

Step 7: This steps shows how you need to register Post and Pre Images for each Step as well.  This allows the audit plugin to know what the value was before it changed and what it is after the change.

crmaudit7.jpg

Step 7b: A sample of creating a Pre image.  Note, you will need a Pre and Post image for all Update steps and only a Post image for any Create steps.

crmaudit8.jpg

You can see that it is pretty simple to register the plugin to be able to audit any entity or even any attribute that you want. 

Resources:

CRM Plugin Registration Tool

CRM Audit Plugin Package (includes everything mentioned)

posted in Microsoft .Net, Microsoft Dynamics CRM | 13 Comments

  • Links

  • Calendar

  • September 2010
    S M T W T F S
    « Jun    
     1234
    567891011
    12131415161718
    19202122232425
    2627282930