Today’s guest blogger is Blake Scarlavai, a Senior CRM Developer at Sonoma Partners.
Fiddler can be extremely helpful in troubleshooting CRM issues and also great for testing web requests before deploying. In this post I will go over some of the helpful and maybe not-so-obvious features of Fiddler.
First things first, you can find Fiddler here - http://fiddler2.com/fiddler2/version.asp. Also to get started we first need to turn on a few settings.
If you are using HTTPS then go into Tools – Fiddler Options -> HTTPS Tab and check the following options:
- Capture HTTPS CONNECTs
- Decrypt HTTPS traffic
- Ignore server certificate errors
Next, click on the Composer tab on the right side panel of Fiddler. Then click on the Options sub-tab and select Automatically Authenticate
With these settings turned on, we can now perform the following techniques.
The main feature of Fiddler is being able to log and inspect web requests being made from the client machine. In CRM this is very helpful for debugging any requests that are failing and it also can be used to see how much traffic there is and how long each request takes. If you have ever seen a “Not Found” error coming from a Silverlight web request then usually Fiddler can be used to spot the failing request and uncover a more helpful detailed error.
To get started logging traffic. Make sure the bottom left corner of Fiddler says “Capturing” and if not click the empty box to enable logging.
Once logging is enabled, browse to CRM and navigate to the area that makes the failing web request. You should see a request on the left pane in red which indicates that there was an issue.
If we click on the red web request we can then use the Inspectors tab on the right side pane to inspect the web request. The top pane will show information about the request and the bottom pane will show information about the response. For my specific example, I can use the bottom pane to see the response and notice that there is a more detailed error being returned. Fiddler is telling me that “‘SystemUser’ entity does not contain attribute with Name ‘new_test’.”. I know that this attribute doesn’t exist in my Organization and I can check the top pane to view the request and see that a query for SystemUser is being made and trying to return the non-existent ‘new_test’ attribute.
For performance tuning on a CRM form, we can clear out all the existing web requests using Ctrl-X and then stop capturing until we are ready to pull up the form. Once we are ready to pull up the form, click the box at the bottom left to start capturing traffic again. Now open the CRM form and when it is finished loading, click the box again to stop traffic. Now highlight all the web requests in the left pane and in the right pane, click the Statistics tab at the top. This will display some helpful information such as how many requests were made, the bytes sent and received, and the amount of time the requests took. In my example below, there were very few requests made and it took about 1.5 seconds to complete.
We can see a chronological view by highlighting all of the web requests again and selecting the Timeline tab on the right. This will show a breakdown of how long each request took.
A very helpful feature in Fiddler is the Composer feature. If we go back to the very first example where a query for SystemUser is being made with a non-existent column, we can use the Composer tab to fix the very same web request. To fix this we can go to CRM where the failing web request happens. Capture that web request using fiddler and now click on the Composer tab on the top right pane. Then drag the web request from the left pane over to the right pane. This will auto-populate values in the Composer tab and allow us to edit the Request Body at the bottom of the right pane.
In my example I can remove the problem attribute in the Request Body highlighted above. Then I can recreate the web request without the problem attribute by clicking Execute at the top right. This will perform the new web request and log it in fiddler as well. As shown below using the Inspectors tab, my new web request was executed without the problem attribute and data was successfully returned in the Response pane at the bottom.
We can take the above example with the Composer feature even further. First grab the TextView of the Response body above (the working web request) and copy and paste it into notepad. Save that file as XML. Now highlight the problem web request in the left pane and click the AutoResponder tab at the top of the right pane. In the AutoResponder pane first check Enable automatic responses and Unmatched requests passthrough. Now click Add at the top right to create a new rule. At the very bottom, use the second drop down to select the XML file that was saved in the first step. Then click Save. What this does is create a rule that says “If a request URI matches this specific URI, then respond with the selected XML”. In our scenario this will look for any requests that match the URI of our problem request and return the XML of our working web request.
With this AutoResponder rule setup we can now test our fix for the problem web request by navigating to it again in CRM and it should work as if there isn’t a bug in our query and respond with the correct data.
By using the above techniques we can troubleshoot our web request issues to uncover a helpful error, test our fix to the problem web request and see it in action without deploying any code updates. Now that we have our fix, we can make our code changes and deploy it for testing.
With the Thanksgiving and Christmas holidays causing a major distraction, Microsoft quietly released an impressive new update for Microsoft Dynamics CRM 2011. In typical wordy Microsoft marketing fashion, this released is named “Microsoft Dynamics CRM November 2011 Service Update”, although you might also see this release referred to as (these are all the same thing believe it or not):
- Microsoft Dynamics CRM Q4 2011 Service Update
- Microsoft Dynamics CRM 2011 Update Rollup 5 (how you actually download and install the update)
- Microsoft Dynamics CRM 2011 R7 (Microsoft’s internal code name for this release)
You can check out the official Microsoft marketing content if you want to get your information right from the source:
- Microsoft Dynamics CRM November 2011 Service Update website complete with a 25 minute “What’s New” video.
- Microsoft Dynamics CRM Release Preview Guide
- Introduction to the Microsoft Dynamics CRM November 2011 service update blog post from Microsoft
We wanted to share our perspective on this release and call out the highlights. So without further ado, here we go! These are listed in rough order of importance from high to low.
Social Capabilities via Activity Feeds
Microsoft Dynamics CRM 2011 now offers social networking capabilities directly within the platform via Activity Feeds. Activity feeds offer enterprise microblogging so that users can internally share and collaborate on CRM records. The activity feeds posts can be user generated or auto-generated based on rules that you configure. We created a short screencast to give you an overview of how activity feeds work within Microsoft Dynamics CRM:
The fine print: Microsoft does not automatically add Activity Feeds to your existing CRM Online deployment, you need to manually install Activity Feeds and setup them up. You can download the Activity Feeds solution from the Dynamics Marketplace.
Enterprise Cloud Capabilities
While Microsoft Dynamics CRM Online is a great offering, in the past it lacked some of the capabilities that many large organizations demand. With the November 2011 Service Update, Microsoft Dynamics CRM Online is truly ready for the enterprise:
- Microsoft CRM Online supports Active Directory federation so that users can logon with their regular AD accounts (instead of having to create a separate Windows Live ID account like CRM Online users need to do today). This is often referred to as single sign-on (SSO).
- Microsoft announced they designed the AD federation feature so that they can support additional identity platforms in the future, although they didn’t specify which platforms they are thinking (guessing Facebook? Google?).
- Microsoft added in-region disaster recovery with additional data centers in Europe and Asia. In the past, all of CRM Online was run out of data centers in the United States.
- Microsoft added a bunch of industry certifications which many customers require of their data center.
The fine print: First, only customers running Microsoft Dynamics CRM Online on the OSDP (Online Services Deployment Platform) can setup AD federation. If you have an existing CRM Online org, you will need to get your organization migrated to OSDP. You cannot just “turn on” AD federation for your CRM Online deployment. Microsoft has not released the details and timing on this migration process for existing customers. If you are considering purchasing Microsoft Dynamics CRM Online and you need AD federation, you can request a CRM Online trial on the OSDP platform but you must have at least 100 users.
In order to setup single sign-on, you need to configure Active Directory Federation Services 2.0 and meet the system requirements.
Announced Additional Browser Support for Microsoft Dynamics CRM
This one is a little tricky because it’s just an announcement of FUTURE functionality but we think it’s hugely important. Microsoft announced that the next service update (codenamed R8) will support multiple web-browsers and platforms. This includes:
- Safari web browser (PC and Mac / iPad)
- Firefox web browser (PC and Mac)
- Chrome (PC only)
We are particularly excited about this because supporting Safari on a Mac also means that users will be able to access Microsoft Dynamics CRM through their iPad or iPhone. Nice! Microsoft communicated that the R8 release will be in the first half of calendar year 2012.
The November 2011 Service Update also includes a handful of nice little feature updates. These improvements include:
- Outlook reading pane improvements
- You can now click on links in the reading pane (email, telephone, lookups, etc.)
- Subgrids can be displayed
- The reading pane will show Lync presence
- Outlook email tracking switched to asynchronous, this will provide better performance over slower connections
- Dialog improvements
- Data is saved when moving back and forth within dialog windows
- Added support for Date, Date Time and Lookup type data attributes
- Added Insert Hyperlink capability so that you can include the Record URL in workflows and dialogs
- Added User Audit capabilities so that companies can track when users logon to Microsoft Dynamics CRM (either via a Web browser or Outlook client)
- Improvements to charting and reporting capabilities:
- Added area and stacked chart types
- Can include multiple series per chart (up to 5 series)
- Duplicate detection enhancements
- You can now ignore blank values when configuring your rules
- You can also exclude inactive matching records when looking for duplicates
Unified Office 365 Experience
The November 2011 Service Update makes life a little easier for customers that are also using Office 365 because now they can have unified provisioning, billing and administration between the two systems.
The fine print: This has same restrictions as the ones mentioned above for Active Directory federation, it only applies to new customers running CRM Online on the OSDP platform.
Obviously this update includes lots of great new stuff, but if you’re like us you’re already wondering what’s next after this?!?! You should expect to see the next release codenamed R8 in the first half of 2012, but Microsoft hasn’t announced the details of that release just yet. We are also expecting Microsoft to release an updated Statement of Direction document very soon, so stay tuned for details on that.