Fiddling with CRM

Posted by Sonoma Partners on January 17, 2012  |  commentsComments (2)

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

clip_image002

Next, click on the Composer tab on the right side panel of Fiddler.  Then click on the Options sub-tab and select Automatically Authenticate

clip_image004

With these settings turned on, we can now perform the following techniques.

Request Logging

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.

clip_image006

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.

clip_image008

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.   

clip_image010

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.

clip_image012

Composer

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.

clip_image014

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.

clip_image016

AutoResponder

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.       

clip_image018

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.

What’s New in the Microsoft Dynamics CRM November 2011 Service Update

Posted by Mike Snyder on January 5, 2012  |  commentsComments (0)

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:

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.

Feature Enhancements

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.

What’s Next?

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.

Light “spackling” for your Activity Feed walls

Posted by Sonoma Partners on December 30, 2011  |  commentsComments (2)

Today's guest blogger is Jacob Cynamon-Murphy, a Technical Specialist at Sonoma Partners.

I'm a big fan of Activity Feeds, the social CRM feature in Microsoft Dynamics CRM introduced with release 7 (R7) in November.  Not only can users manually post to "record walls," but power users can use Activity Feed Rules or custom workflows to create auto-posts when meaningful events occur on records or in the system.  Internally, we have updated the Sonoma Vibe desktop and iPad clients to use the new Activity Feed Post and Comment entities as well, making it very easy to share news and knowledge (not to mention fun) with the rest of the company.

Image008

As a technical specialist at Sonoma Partners, I am responsible for managing the demo environments that we use.  Benefitting from a little slow time while everyone is on holiday, I decided the time was right to deploy the managed solution for Activity Feeds to all of our demo orgs that my colleague in IT had updated to R7.  While deploying the solution and enabling activity feeds for the primary entities, I quickly noticed that the bit field to enable record walls sometimes remained at 'No' despite everything I attempted to set it to 'Yes'.

Image009

I wondered if this might be a common issue, so I checked the Microsoft Dynamics CRM forum and the CRM Team blog.  On the blog, I discovered an article about enabling record walls manually; in short, the plugin that processes Activity Feed Configuration records is designed to only add a record wall to an entity's form if there is only a single form of type "Main".  The article goes on to walk through the manual steps to add the tab and HTML web resource to each form, attach the JavaScript web resource to the forum, and register an event handler from the JavaScript to the tab; that last step cleans up the form by hiding the record wall until a user accesses it from the form navigation on the left-hand side.

Image005

While this approach works fine if you have one or two forms to modify, I had dozens; several of our demo environments have managed solutions or manual customizations that use role-based forms.  I decided to write a quick-and-dirty utility that prompts the user for a server name and an organization name (and saves up to 9 server/org pairs), credentials and an entity logical name and automates these form customization steps for each "Main" form of the entity.

Image010

If you have a complex implementation including entities with multiple forms, this utility - available for download - will save you time configuring and get your organization more social, and patch up record walls so your users can share information more effectively.

 

Security Settings for Displaying a Native Ribbon Button

Posted by Sonoma Partners on November 7, 2011  |  commentsComments (1)

Today’s guest blogger is Blake Scarlavai, a Senior CRM Developer at Sonoma Partners.

Having trouble figuring out why a native ribbon button isn’t displaying?  An easy way to determine the permissions required for the ribbon button is to export the entity or application ribbon. 

For example, we were trying to set up a security role and allow the permission to import data.  The ‘Import Data’ ribbon button is usually displayed in the application ribbon but it wasn’t displaying for a user with our new security role. 

clip_image002

To debug this, I took to the application ribbon xml.  I used this handy sample code to easily export the application ribbon from my organization - http://msdn.microsoft.com/en-us/library/hh547439.aspx.  Another option would be to add the application ribbon to a standalone solution and export that solution to retrieve the ribbon xml.

Once the application ribbon xml is retrieved, I was able to search for the word ‘import’ to find the following button definition:

<Button Id="Mscrm.BasicHomeTab.Tools.ImportData" Command="Mscrm.ImportData" Sequence="10" Alt="$Resources:Ribbon.Jewel.ImportData" LabelText="$Resources:Ribbon.Jewel.ImportData" Image16by16="/_imgs/ribbon/ImportData_16.png" Image32by32="/_imgs/ribbon/importdata32.png" TemplateAlias="o1" ToolTipTitle="$Resources:Mscrm_BasicHomeTab_Tools_ImportData_ToolTipTitle" ToolTipDescription="$Resources:Mscrm_BasicHomeTab_Tools_ImportData_ToolTipDescription" />

From the button definition, I was able to find the Command Id ‘Mscrm.ImportData’ (highlighted above).  I then searched the ribbon xml for ‘Mscrm.ImportData’ to find the following Command Definition so that I could identify the DisplayRule.

<CommandDefinition Id="Mscrm.ImportData">
  <EnableRules />
  <DisplayRules>
    <DisplayRule Id="Mscrm.NotOffline" />
    <DisplayRule Id="Mscrm.ImportData" />
  </DisplayRules>
  <Actions>
    <JavaScriptFunction FunctionName="Mscrm.ImportData_0" Library="$Webresource:Ribbon_main_system_library.js" />
  </Actions>
</CommandDefinition>

As highlighted above, the DisplayRule has the same name as the CommandDefinition so I continued to search the ribbon xml for ‘Mscrm.ImportData’ to find the following DisplayRule definition:

<DisplayRule Id="Mscrm.ImportData">
  <EntityPrivilegeRule EntityName="import" PrivilegeType="Create" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="import" PrivilegeType="Delete" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="import" PrivilegeType="Read" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="import" PrivilegeType="Write" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="importmap" PrivilegeType="Create" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="importmap" PrivilegeType="Read" PrivilegeDepth="Basic" />
  <EntityPrivilegeRule EntityName="importmap" PrivilegeType="AppendTo" PrivilegeDepth="Basic" />
</DisplayRule>

As you can see, the DisplayRule definition above explicitly lays out the not-necessarily-obvious permissions needed for the ‘Import Data’ button to display.  We compared this with our security role permissions to discover that we were missing Delete rights on the import entity (Data Import).  Once this privilege was added, our ‘Import Data’ button magically appeared.

clip_image002[4]

Convergence 2012 – Registration Opens in November

Posted by Ryan Toenies on October 31, 2011  |  commentsComments (1)

Registration for Convergence 2012 is just around the corner (#CONV12).  Registration opens on November 16 and the early registration period ends on January 25.  Early registration will save you $300 on the conference fee.

Convergence Registration

Convergence 2012 is being held in Houston, TX, from March 18 – 21.  A little birdie has informed me that you will NOT want to miss the opening Convergence Reception on Sunday night, March 18.  Plan your travel schedule accordingly. 

Highlights of the 2012 Convergence Conference

  • New Experience Center
  • Keynote Speaker on Wednesday, March 21 (TBA)
  • User Group Sessions
  • Birds of a Feather
  • Interactive Discussions

We look forward to seeing you at Convergence 2012 in Houston!

Document Assembly & Management, the One Stop Shop!

Posted by Sonoma Partners on October 26, 2011  |  commentsComments (1)

Today’s guest blogger is Josh Meyer, an account executive at Sonoma Partners.

In today’s vast world of software products, it’s nearly impossible to find a single platform that can provide all of the business functionality that end users need to accomplish their daily activities. How often do we all need to log onto several different systems throughout the course of the day to get our work done? Typically, these tools never look or function in the same manor, creating a painful end user experience. Rarely do any of these tools communicate with one another leaving information in silos … if only the dots could be connected.

Connecting the Dots

Microsoft Dynamics CRM 2011 takes the first step in connecting commonly used tools together for end users. How many of us use Outlook, Word, and Excel on a daily basis? Is it fair to say that nearly all of us use these tools at a very high frequency? Microsoft Dynamics CRM 2011 was built to deliver a platform that can be configured to meet your unique business needs while integrating with other commonly used Microsoft products (Office, SharePoint, Lync, and etc). This seamless integration enables users to utilize familiar applications to accomplish their daily activities.

While this seamless integration is important, it doesn’t in itself solve the issue of connecting with your unique business process. Ultimately, these system needs to be altered to meet your needs. Sonoma Partners helps clients take this important next step to not only configure Microsoft Dynamics CRM 2011 to meet your business needs, but also to extend that configuration to the entire business process experience.

Document Assembly & Management Revealed

On a regular basis we are all creating and managing documents, if only they could be connected in some way to the business information and business processes that uses that information. Sonoma Partners has built CRM add-ins for Microsoft Word & Excel that enable users to use these tools in their native setting but allowing them to push and or pull information into Microsoft Dynamics CRM and Microsoft Office SharePoint. For users, this is critical because it allows them to continue to use the tools that maximize their efficiency, while ensuring that the work they perform is connected to all the key business processes. Preserving a native application experience helps to promote a collaborative experience throughout the organization.

Microsoft Word Generation

In this example, we take a simple status report that we have all either written or received at one point in time. Typically, a status report is written in a Microsoft Word document and distributed to a client. Then, hopefully, the author remembers to save the document in a central file location for broader reference and would finally update their project management system to track key metrics from the status report. By this point the author has likely spent more time saving the status report & updating the project management system than it took to create the initial status report. That is not business productivity!

The Sonoma Partners Word add-in is a CRM accelerator that resides in Microsoft Word that allows the author to easily open Word templates that connect data to and from your CRM database. In the above example, the author would enter the necessary information into the status report, and then click a button to push the data back to CRM. The Add-in also allows you to save the document to SharePoint and then email the update to all appropriate members.

Sonoma Partners first blogged about two way integration between Microsoft Word and Microsoft Dynamics CRM last September!

This integration scenario demonstrates a user utilizing a familiar tool, Microsoft Word, while performing multiple business tasks from a single user interface. This creates a simplified user experience while adhering to standardized business processes.

image

Microsoft Excel Management

Microsoft Excel is the world’s most popular software application to perform data analytics and data manipulation. Often, the challenge is that the Excel data and results aren’t pushed back to any system where it can provide wider organizational value. In this example, we take a project plan that was built and maintained through Excel and show you how to expand the reach through Microsoft Dynamics CRM. The challenge we have found, as it relates to project plans, regardless of the tool, is that the data in the project plan is not actionable through any of the business systems, ultimately limiting its effectiveness.

The Sonoma Partners Excel add-in allows the author to maintain their project plan in their tool of choice, update relevant details (dates, statuses and etc.), then synchronize that content to Microsoft Dynamics CRM where actionable business workflow can be applied. This add-in allows for bi-directional synchronization between Excel and CRM, negating the need for the project plan to always be maintained in Excel because it is stored in CRM. The author simply needs to open Excel, load the data, make the appropriate updates and synchronize with CRM.

clip_image004

Both the Microsoft Word & Excel add-ins highlight examples of enabling users to be more effective while utilizing familiar experiences to gain maximum business productivity. This powerful combination results in increased collaboration, higher end user adoption and adherence to important business processes that will help support a stronger bottom line!

Trying to catch my form ridin' dirty?

Posted by Brendan Landers on October 14, 2011  |  commentsComments (3)

I recently had a customer that was unable to use the native print functionality for a particular entity.  Anytime they tried to print (File --> Print Preview) from within the form, they received the following warning "This form has been changed and must be saved before printing":

 Error

This happened even though the user had just opened the form (without making any changes).  Even if they saved the form and tried again, they received the exact same warning.  The form was perpetually "dirty" thus preventing the ability to print (along with forcing saves on close even when no change was made).  We disabled all the javascript we had on the form, and the problem persisted.  

I had a colleague whip up some JS that would show me what fields were considered dirty:

javascript:var message="The following fields are dirty: \n";window.frames[0].Xrm.Page.data.entity.attributes.forEach(function(attribute,index){if(attribute.getIsDirty()==true){message+="\u2219 "+attribute.getName()+"\n";}});alert(message);

I just loaded the form, pasted the above in the address bar and voila - I could see which fields CRM was angry about.  (Depending on your browser security settings, you might need to manually type the "javascript:" into the address bar). It turned out CRM didn't like one of my lookup fields on the form.  It wasn't immediately obvious why CRM was unhappy, but after further head-scratching and leaning on the experience of my fellow Sonomans we finally figured it out.

JSPrompt

The value of the primary attribute of the lookup (generally the name field) contained two consecutive spaces (due to a concatenation issue pre-import).  Any time you have a record with 2 or more characters of white space in the name field, and that record is selected in a lookup, Microsoft CRM will think that lookup is dirty.  The reason is because CRM tries to be clever around removing extra white space between words.  What ends up happening is when it’s checking to see if a lookup is dirty, it checks to see if both the default value and the current value have the same id, typecode, and name.  But when it checks the name part, the default value has the correct spacing, and the current value has the trimmed spacing, and so they don’t match and CRM thinks the lookup is dirty.  

Here is an example:

Example

You can see that the first name contains many spaces, but above the header where the primary attribute field displays, the extra spaces are removed.  The same thing happens on a lookup:

 Lookup

The fix was quite simple - update the fields to replace consecutive spaces with a single space.  While we like that Microsoft included logic to clean up the value, we have submitted a case indicating that the form being dirty in these instances is, in our opinion, a bug. We did some testing in the Microsoft CRM Online environment and it looks like this might already be corrected but some of you on-premise customers might still see this issue.

Many thanks to Bob Lauer, Corey O'Brien, and Rob Montague for helping me get to the bottom of this one!

Dynamics CRM 2011 Web Resource Content Size Is Too Big Error

Posted by Sonoma Partners on October 9, 2011  |  commentsComments (0)

Today’s guest blogger is Mike Dearing, a CRM Developer at Sonoma Partners.

A colleague of mine started receiving an import error for web resources a few days ago on a client environments, “Web Resource content size is too big”.  His scenario was tricky because none of us had ever run into this error before and was working previously. Scouring the forums led us nowhere, but a quick search on MSDN saved the day!

Size Limitations

The maximum size of files that can be uploaded is determined by the Organization.MaxUploadFileSize property. This property is set in the E-mail tab of the System Settings in the application. This setting limits the size of files that can be attached to e-mail messages, notes, and and unfortunately web resources. The default setting is 5MB.

image

As luck would have it, our client wanted to disallow attachments on notes, so they had correctly updated this property to 0.  Unfortunately, since we now know that this property is shared between 3 different areas of functionality, we had to reset it and were able to properly import/update web resources again. Of course, we need to go back and change the setting after each solution update in order to respect the business requirement. 

We created a Connect suggestion to alter this behavior. If you agree, vote it up!  Hopefully this helps others who may run into this issue in the future.

Some Assembly Required – Unmanaged Solution Gotchas

Posted by Kristie Reid on September 20, 2011  |  commentsComments (4)

In Microsoft Dynamics CRM 2011, you can use solutions to bundle and export customizations from one environment into a different Microsoft CRM system (perfect for moving from development to QA to production). You might assume that exporting the solutions from one system to another would provide a perfect duplicate of the original environment. However this is not always the case! We have found a few gotchas regarding importing solutions that I wanted to share. Specifically:

  • Audit Settings
  • View Status
  • Default Views and Dashboards

Let’s explore each of these in more detail.

Audit Settings

During the export process of a solution, you can now select which system settings you want to migrate between the two environments.

 01 - Export System Settings

This flexibility to pick and choose is excellent. However, if you carefully compare the full list of System Settings to which settings you can export, you will notice that some of the options (such as Auditing) are missing: 

02 - System Settings 

What we found is that the Enable Auditing in the following areas checkboxes are transferred from one environment to another, without needing to select any of the system settings for export. However, the Start Auditing is not. When documenting the steps to perform a deployment, make sure that manually checking this important box if you are performing auditing on any of your entities is one of those steps.

 

View Status

A new feature with Microsoft Dynamics CRM 2011 is the ability to deactivate views. For example, I have customers who do not use Campaigns so the native Accounts: No Campaign Activities in the Last 3 Months view is irrelevant. To remove confusion for those end users, I simply deactivate this view. To do this, simply select the view you want to remove from the user interface and select Deactivate. As always, don’t forget to publish.

03 - Deactivate View 

However what we found is that when you import solution into a target system, the deactivated views do NOT remain deactivated within the destination environment. Therefore, if you want to hide these views from the users, you will need to go into the target system and manually deactivate the views again (bummer). If you're writing up deployment notes, please remember to include this step!

 

Default Views and Dashboards

Microsoft Dynamics CRM allows administrators to specify the Default Views and Dashboards that users see when they navigate to a specific part of CRM. Unfortunately, similar to the inactive views gotcha we just explained, the default settings on views and dashboards do not import into new environments as you might exepect them to. Let's explain in a little more detail.

First, let’s look at what happens when you change default views on entities. In my example, I changed the default view on the Account entity in my development environment to Accounts: No Campaign Activities in the Last 3 Months. I then exported a solution containing the Account entity and imported it into an environment where the default Account system view was set to My Active Accounts. The result was two default system views for the Account entity!

04 - Multiple Default Views 

Alternatively, when you import customizations with a different default dashboard, the imported solution ignores that setting entirely.

We were thinking that these were actually defects in the product but Microsoft support informed us otherwise. Apparently they think that the issue with duplicate default views is acceptable behavior since it really only affects users the first time that they view that entity. Each user has the option to set their own default view which overrides the default view (or views!) set by the administrator. The Microsoft CRM support team indicated that the issue with imported solutions ignoring default settings is (a-hem) “by design”. Again, users have the option to set their own default dashboard which overrides the system wide settings. Granted that's a little hinky and it requires an extra step by the user, but it does work.

I hope this helps smooth out some bumps with your deployments and we would love to hear any other gotchas that you would like to share!

Creating Your Own Custom Privilege Settings in Dynamics CRM 2011

Posted by Sonoma Partners on September 9, 2011  |  commentsComments (3)

Today’s guest blogger is Jacob Cynamon-Murphy, a CRM Development Manager at Sonoma Partners.

This post assumes the reader is familiar with how to customize their Application Ribbons and add or revise JavaScript web resources. Special thanks go to my colleague, Bob Lauer, our JavaScript guru.

The problem

In virtually every client project we have implemented for Microsoft Dynamics CRM 2011, clients have had a need for custom settings that we could use with ribbon buttons or other web resources to restrict functionality. These are akin to “Miscellaneous Privileges” in the native CRM configuration.

There is currently no native support for custom privileges (although I have an outstanding request on Microsoft Connect that you can vote up). In the meantime, we have come up with a solution to allow clients to have a generic settings entity definition and some JavaScript to support a set of dynamically growing settings records and a means to wire them up to ribbon button enable rules or web resource functionality.

A specific example that we will consider below is the case of closing opportunities. Natively, having the Update Opportunity privilege allows a user to close Opportunity records as won or lost. If a CRM administrator wanted to restrict the ability to close these records to a subset of users who could edit opportunities, he or she would have used a blank role, assigned it to users granted to “close” privilege and then detect this with custom code. It was effective, but didn’t scale well to additional rules; having many CRM security roles for privilege management could become unwieldy.

The solution

A more scalable solution would allow settings to be defined dynamically by a power user and use common code to to properly restrict the functionality. For our solution, we’re focusing on basic settings that a user can be granted and providing a means to easily retrieve these rules for use in CustomRule definitions within the EnableRules node of RibbonDiffXml.

The entity, which we have entitled Privilege Setting, is a simple entity with a Name field to store the name of the custom privilege. I’ve also enabled this entity for Connections, which allow us to easily enable or disable the users granted the privilege. Administrators can create additional rules very easily through the Dynamics CRM 2011 UI and consume those rules with JavaScript and ribbon customizations, as outlined below.

clip_image001

To take advantage of the power of Connections, I have defined two custom Connection Roles. One, exclusive to Users, is called Has Permission To. The second, exclusive to Privilege Settings, is called Is Granted To. When you create the Connection, you grant a user the permission to the custom privilege. Another benefit of this approach is these roles enhance the understanding of the assignment and know why the association exists.

clip_image002

In this example above, both Jim and I are configured with the ability to close opportunities.

Once the configuration is complete, the next step is to apply a custom ribbon rule to use the privilege setting.

Defining CustomRule JavaScript, you have to produce an asynchronous JavaScript call to retrieve the settings record(s). This technique is outlined in the CRM 2011 SDK in a note under <CustomRule>, although I personally would direct you to Makarand Keer’s blog post which demonstrates the process with a JavaScript sample. I have adapted the script that Keer uses, providing a generic JavaScript method to support retrieving settings records for CustomRules.

Once the entity, connection roles and JavaScript web resources are in place, we have to define the RibbonDiffXml to create rules based on these settings records. I’ve provided a sample CustomRule that would consume a settings record and sample CommandDefinitions that use the CustomRule for CanCloseOpportunities to enable/disable the Close As Won and Close As Lost ribbon buttons for opportunities. This ribbon XML assumes the settings record named "CanCloseOpportunities" exists. The CustomRule for json2.js forces Dynamics CRM 2011 to load the JSON library on which settings.js is dependent; isNaN without a parameter is guaranteed to return true.

CustomRule

<EnableRule Id="Sonoma.PrivilegeSetting.CanCloseOpportunity">
  <CustomRule FunctionName="isNaN" Library="$webresource:sonoma_/Scripts/Utils/json2.js" />
    <CustomRule Default="false" FunctionName="Sonoma.Ribbon.Settings.hasPrivilege" Library="$webresource:sonoma_/Scripts/Ribbon/settings.js">
    <StringParameter Value="CanCloseOpportunities" />
   </CustomRule>
</EnableRule>

CommandDefinitions

<CommandDefinition Id="Mscrm.HomepageGrid.opportunity.MarkAsWon">
  <EnableRules>
    <EnableRule Id="Mscrm.SelectionCountExactlyOne" />
    <EnableRule Id="Mscrm.VisualizationPaneNotMaximized" />
    <EnableRule Id="Sonoma.PrivilegeSetting.CanCloseOpportunity" />
  </EnableRules>
  <DisplayRules>
    <DisplayRule Id="Mscrm.CanWriteOpportunity" />
  </DisplayRules>
  <Actions>
    <JavaScriptFunction Library="/_static/_common/scripts/ribbonactions.js" FunctionName="Mscrm.OpportunityActions.close">
      <CrmParameter Value="SelectedControlSelectedItemReferences" />
      <BoolParameter Value="true" />
      <CrmParameter Value="SelectedControl" />
    </JavaScriptFunction>
  </Actions>
</CommandDefinition>
<CommandDefinition Id="Mscrm.HomepageGrid.opportunity.MarkAsLost">
  <EnableRules>
    <EnableRule Id="Mscrm.SelectionCountExactlyOne" />
    <EnableRule Id="Mscrm.VisualizationPaneNotMaximized" />
    <EnableRule Id="Sonoma.PrivilegeSetting.CanCloseOpportunity" />
  </EnableRules>
  <DisplayRules>
    <DisplayRule Id="Mscrm.CanWriteOpportunity" />
  </DisplayRules>
  <Actions>
    <JavaScriptFunction Library="/_static/_common/scripts/ribbonactions.js" FunctionName="Mscrm.OpportunityActions.close">
      <CrmParameter Value="SelectedControlSelectedItemReferences" />
      <BoolParameter Value="false" />
      <CrmParameter Value="SelectedControl" />
    </JavaScriptFunction>
  </Actions>
</CommandDefinition>
<CommandDefinition Id="Mscrm.Form.opportunity.MarkAsLost">
  <EnableRules>
    <EnableRule Id="Mscrm.CanWritePrimary" />
    <EnableRule Id="Sonoma.PrivilegeSetting.CanCloseOpportunity" />
  </EnableRules>
  <DisplayRules>
    <DisplayRule Id="Mscrm.CanWriteOpportunity" />
    <DisplayRule Id="Mscrm.OpportunityIsOpen" />
  </DisplayRules>
  <Actions>
    <JavaScriptFunction Library="/_static/sfa/opps/opps.js" FunctionName="complete">
       <BoolParameter Value="false" />
    </JavaScriptFunction>
  </Actions>
</CommandDefinition>
<CommandDefinition Id="Mscrm.Form.opportunity.MarkAsWon">
  <EnableRules>
     <EnableRule Id="Mscrm.CanWritePrimary" />
     <EnableRule Id="Sonoma.PrivilegeSetting.CanCloseOpportunity" />
  </EnableRules>
  <DisplayRules>
    <DisplayRule Id="Mscrm.CanWriteOpportunity" />
    <DisplayRule Id="Mscrm.OpportunityIsOpen" />
  </DisplayRules>
  <Actions>
    <JavaScriptFunction Library="/_static/sfa/opps/opps.js" FunctionName="complete">
      <BoolParameter Value="true" />
    </JavaScriptFunction>
  </Actions>
</CommandDefinition>

We’ve packaged the Privilege Setting entity, the two Connection Roles and the two JavaScript files into a managed solution (download here). This solution can be imported into your Dynamics CRM 2011 environment and consumed immediately; you simply need to create 1 or more Privilege Settings records and revise your ribbon definitions to include CustomRules that call the settings.js library, as shown above. Then connect the users to that custom privilege record to allow access.

Is your Microsoft CRM Ribbon missing in Outlook?

Posted by Matt Weiler on August 22, 2011  |  commentsComments (3)

We've been doing a lot of work with the ribbon in Microsoft CRM 2011. It's much more flexible than the old ISV.config setup from Microsoft CRM 4.0, but that flexibility comes at the cost of complexity. If you've worked with the ribbon at all, you know what I'm talking about!

For a recent client, we added a custom group and button to the main grid for every entity in the Application Ribbon, and then we control which entities the button actually displays for using a DisplayRule. The intent is to not have to include all the entities we want to add ribbon buttons to in our solution, since the entities are commonly customized ones like account, contact and lead. This way, we can also easily extend this button to more entities in the future by simply altering the DisplayRule and not having to touch the entity specific ribbon.

ButtonOnAccountGrid

We had the CustomAction set up something like this, using the {!EntityLogicalName} token to ensure that the action applied for all entities:

<CustomAction Id="Customer.Global.AllEntities.HomepageGrid.Group.CustomAction" Location="Mscrm.HomepageGrid.{!EntityLogicalName}.MainTab.Groups._children" Sequence="110">

And it had a child button that looked like this:

<Button Id="Customer.Global.AllEntities.HomepageGrid.Group.Button.DoSomething" Command="Customer.Global.Commands.DoSomething.Grid" Sequence="10" LabelText="$LocLabels:Customer.Global.Labels.SendMail" ToolTipTitle="$LocLabels:Customer.Global.Labels.DoSomething" ToolTipDescription="$LocLabels:Customer.Global.Labels.DoSomething.Description" TemplateAlias="isv" Image16by16="$webresource:new_/Images/DoSomething_16x16.png" Image32by32="$webresource:new_/Images/DoSomething_32x32.png" />

We used similarly set up buttons in the application ribbon for all entities' forms and subgrids. This worked perfectly in the regular CRM web interface. However, we started to notice that people were having issues with the CRM Outlook integration, saying that the ribbons for CRM were not showing up anymore.

To debug this, we enabled a feature in Outlook you might not know exists: you can enable add-ins to show user interface errors. Go to File -> Options -> Advanced -> Developers, and then check off the "Show add-in user interface errors" option:

OutlookAddonOptions

When we reloaded Outlook, we received a series of errors that claimed that we had duplicate Ids for a ribbon button:

DupeError

We escalated to Microsoft support, confused that our buttons worked with no issue in the Web UI, but caused issues in Outlook. Their response was something that we'd overlooked: you can use the {!EntityLogicalName} token in the Id field as well, not just in the location. It seems that when the XML for the final ribbon is generated, CRM will actually duplicate actions and buttons with the {!EntityLogicalName} token in their location so that each entity has their own copy of the button. This doesn't cause an issue in the Web, but Outlook must handle loading the XML differently and sees multiple XML nodes with the same id which it is unable to handle. Incidentally, this issue only rears its head when using buttons added to the HomepageGrid; buttons on the Form and SubGrid both work fine the way we originally had them set up on the Web and in Outlook.

To solve this, we changed the "AllEntities" part of our ids to be the !{EntityLogicalName} token. Thus our final action looks like this:

<CustomAction Id="Customer.Global.{!EntityLogicalName}.HomepageGrid.Group.CustomAction" Location="Mscrm.HomepageGrid.{!EntityLogicalName}.MainTab.Groups._children" Sequence="110">

This worked like a charm, and the ribbon now loads in Outlook just like it should. Hope this helps!

The CRM Journey – What’s next?

Posted by Ryan Toenies on August 16, 2011  |  commentsComments (0)

Chances are if you are reading this blog post you already use a CRM system.  The biggest change in CRM over the last couple of years has been the transformation to the Cloud.  Even if you still run CRM as an on-premises solution there are still pieces of data that reside in the Public or Private Cloud.  As the Cloud evolution continues we are also seeing businesses adapt to all of the new social technologies.  Twitter, Facebook and YouTube are just a few of the websites where businesses now advertise and communicate with their customers.  Sonoma Partners developed Vibe for Microsoft Dynamics CRM to support social collaboration.  Microsoft has announced that their fall CRM release will contain a native social CRM application.  So with all of these trends what’s next with CRM and what should you know now to prepare yourself for tomorrow?

Mobility – Mobility – Mobility

Always connected – sound familiar?  All the major technology companies are depending on it.  Your world is evolving right in front of you and you may not even know it.  Have you been on a flight lately?  WiFi is starting to become the standard on flights.  So even at 37,000 feet you can still track your CRM email activities real-time.  Crazy!

Mango      Android  iPhone

In conjunction with mobility, “touch” interfaces have become the expectation of consumers.  We are now starting to see these trends work their way into corporations.  I was just on a call last week where a company purchased iPads for their entire sales organization (1,000+).  Microsoft understands this trend is not going away and has been working for a few years to transition their product lines to support mobility and a more immersive end-user experience (like touch).  Enter the “Metro” user interface. The Metro design concept has worked it’s way into Windows, Windows Phone and Xbox. 

One of the core concepts to the Metro experience is Live Tiles.  Live Tiles deliver real-time information to the user in an interactive type fashion.  As an example, if someone posts a message on your Facebook wall that message will appear within the Live Tile for Facebook on your Windows 8, Windows Phone and/or Xbox dashboard.  Think of Live Tiles as a notification engine but on steroids.  Live Tiles allow developers to present real-time information to all of the hardware interfaces you might use on a daily basis (phones, computers and gaming consoles).

Windows8    

Xbox

So how does this impact CRM?  Simple – CRM is all about your customers.  If your customers are communicating with you via email, Skype, Facebook, LinkedIn, Twitter, Foursquare, etc. then your CRM system should support tracking this information in a seamless manner.  Going one step further, your CRM system will need to push and pull data through these applications utilizing new mobility technologies. 

I know, you are reading this and thinking “Xbox,” why is he talking about “Xbox?”  It’s simple really.  Gaming consoles are just another way to communicate with consumers.  Creating an immersive interface that is the same across hardware platforms builds a cohesive ecosystem that becomes familiar to consumers and consistent to developers. 

Microsoft understands our world is changing fast.  If consumers are living on Facebook, watching Live TV on Xbox or conferencing via Skype then we need to be able to communicate and track relevant content with them.  Mobile phones, tablets, laptops, desktops and gaming consoles are here today.  Tomorrow will be another new technology device.  Microsoft continues to innovate with all of their existing products to support these changes and Microsoft Dynamics CRM is no exception. 

To keep pace with innovation in the market, the Dynamics CRM team will be delivering new product functionality every six months.  I suspect that one of the key design pillars moving forward is providing a user interface that takes advantage of an “immersive experience.”  I expect future product updates will take advantage of the Metro design concepts and more specifically, Live Tiles. 

Tomorrow

Sonoma Partners is highly invested in Microsoft Dynamics CRM because this is all we do.  We eat our own dog food by using Microsoft Dynamics CRM to run our business (from A-Z).  To help prepare our consultants for tomorrow we are attending the “Build” conference next month in Anaheim, CA.  We are looking forward to building new and exciting CRM applications for Windows 8, Windows Phone and other mobile technologies. 

Build

If you’re not attending Build don’t worry about it.  Just follow them on Twitter and Facebook to stay up-to-date with all of the latest information.  You can also follow us on Twitter and watch for Tweets about the next generation of Windows and how CRM will evolve. 

Cheers!

Are you Missing Outlook Reminders with Office 2010 SP1 and Microsoft CRM 2011?

Posted by Sonoma Partners on August 16, 2011  |  commentsComments (5)

Today’s guest blogger is Peter Majer, a CRM Sr. Consultant at Sonoma Partners.

Recently, the Office 2010 SP1 was delivered through Windows Updates, and many people in our office who have the Microsoft Dynamics CRM 2011 Outlook Client installed have been reporting that Outlook reminders are no longer working. The only obvious workarounds would be to either uninstall the CRM 2011 Outlook Client, or uninstall Office 2010 SP1. Obviously I didn’t want to uninstall the CRM 2011 Outlook Client as I use it daily to track emails sent to our customers. Uninstalling Office SP1 also wasn’t ideal, as we have a custom Microsoft Word add-in that we built to integrate data between Word and CRM which stopped working after uninstalling Office SP1.

This issue only appears to be occurring when you have both the Office 2010 SP1 installed, and the CRM Outlook Client configured:

  • CRM Outlook Client Configured + Office 2010 = Reminders Work
  • CRM Outlook Client Not Configured + Office 2010 = Reminders Work
  • CRM Outlook Client Not Configured + Office 2010 SP1 = Reminders Work
  • CRM Outlook Client Configured + Office 2010 SP1 = Reminders Don’t Work

There’s a forum post that has been logged identify this issue, and Microsoft is aware of the issue. They’ve created a KB Article to track this issue which will be updated once they identify the fix. After a fix is found, I assume they’ll roll that into a future UR.

Fortunately, after playing around with the Outlook Client, we were able to come up with a workaround that allows you to have both the Microsoft Dynamics CRM 2011 Outlook Client installed and configured, along with Office 2010 SP1 installed, and your Outlook reminders will still appear. Here are the steps to perform this workaround:

1. Un-configure your CRM Outlook Client installation

Outlook must be closed at this point to start the CRM Configuration Wizard. You can do this by running the Configuration Wizard which is typically found in Start-> All Programs -> Microsoft Dynamics CRM 2011 -> Configuration Wizard. Select the Organization(s) that you’ve configured your Outlook Client for, and select “Delete”
clip_image002

2. Startup Outlook and Configure the CRM Outlook Client

When Outlook starts, it should realize that the CRM Outlook Client is installed and not configured, and then prompt you to configure the CRM Outlook Client. Go ahead and enter in your Server URL and select the correct Organization. Complete the information and click OK.
clip_image003

Your Outlook reminders should once again be firing, and CRM will be configured and available for use.

clip_image004

Unfortunately, you’ll need to go through these steps again each time you restart Outlook. While certainly not ideal, I hope this workaround will keep you working until a resolution is provided by Microsoft.

Enjoy!

Have fun with your CRM 2011 forms (and learn from my mistakes)

Posted by Kristie Reid on August 1, 2011  |  commentsComments (1)

Microsoft Dynamics CRM 2011 includes a bunch of new additions to the form customization options and controls. These enhancements provide even more ways to design forms for better usability, perfect for those nit-picky end users! While the form customization enhancements provide much more deisgn flexibility, there are a few downsides to watch out for. Here are some tips and tricks to keep in mind when customizing your forms:

 

1. Drag and Drop – cool or not? Where did the green arrows go?!

A cool new feature of the form designer in Dynamics CRM 2011 is the ability to use your mouse to drag and drop fields onto the form. If you’re like me, after a while you will wonder where the green arrows from 4.0 went. The good news is that you don’t need them, you can now use the arrows on your keyboard – even better!

 

2. Up to 8 columns – great idea? Watch out for different screen resolutions!

Being able to display more information with less scrolling is always a goal. In Dynamics CRM 2011, you can now add sections to tabs up to two columns and up to four columns per section. Technically that’s up to 8 columns of information which can be very useful. However, depending on the screen resolution used, you may end up with some very confused users. Below is an example of a form with 8 columns. The first example is displayed in 1366 x 768 which looks great! The second is shown in 1024 x 768 – not so great.

Large Image


Notice that the last field in the column does not display. (Now seems like a good time to remind you to test, test, test. Even if it is just customization changes.)

 

3. Less clicks – no complaints from me but beware!

If you notice on the screen shots above, you can now access the form editor directly from the ribbon of the entity that you’re on. This new option saves a lot of time when you are first customizing and testing forms. However, this convenience could be very dangerous in a production environment. Make sure that users have the appropriate security roles to prohibit them from doing this (and to all System Administrators, refer back to my message on testing).

 

4. Navigate in less time – but know what can’t be undone

Left navigation links can also be edited directly through the UI now. I love this feature because now these links can be ordered logically for the end user. To make edits to this area, click on the Navigation button on the ribbon. If you are working with links of related records, you can drag and drop from the Relationship Explorer onto the navigation area and re-order as you need to (or use your handy keyboard arrows).

Navigation

One caution on this is that you can only add one link to the navigation area for every related record. In the case of the out of the box Activities and Closed Activities links, that is actually two links to the same related record. So, if you remove those links, you will not be able to re-add them after you save the form without going back into the xml to make that update. However, before you save the form, you can use the Undo button!

 

5. Tab order – an oldie but a goody!

When customizing forms, it doesn’t matter how nice they look. If the user experience isn’t a good one, then they won’t appreciate it. Tab order is very important on forms since most users don’t use their mouse to go from field to field. The shot below (described in more detail in the Working With Microsoft Dynamics CRM 2011 book) shows how the tab order occurs.

Tab Order

Have fun!

Microsoft CRM 2011 Update Rollup 3 Released

Posted by Mike Snyder on July 28, 2011  |  commentsComments (0)

Microsoft just released Update Rollup 3 for Microsoft Dynamics CRM 2011. As a reminder, the first two update rollups were released on:

You can download Update Rollup 3 from www.microsoft.com/downloads now, otherwise it will be automatically available via Windows Update on August 9th. Update Rollup 3 is a cumulative update rollup that includes all the fixes for the issues that are documented in Update Rollup 1 and Update Rollup 2. In addition, Update Rollup 3 contains the following additional fixes (none of which require manual configuration):

  • Assume that you import a plugin method in Microsoft Dynamics CRM 2011. You publish the customization. In this situation, when you start the plugin method, you receive the following error message:

    Unexpected Error
    An error has occurred.

  • The search results for system views in the Dynamics CRM 2011 Client for Outlook are not compliant with the search results in the Microsoft Dynamics CRM web client.

  • When you run a custom report that uses a primary entity and secondary entities, the values in the date and time columns are displayed incorrectly. The columns that should be displayed in the date-only format, are displayed in the date-and-time format instead.

  • Assume that you enable the http compression setting on the Dynamics CRM server. In this situation, the Microsoft Dynamics CRM 2011 Outlook client does not receive responses for SDK calls as compressed. This problem occurs because the Outlook client does not send an "EnableDecrompression" http header with the request.

  • The Dynamics CRM 2011 Client for Outlook initiates background send requests to the CRM server. This behavior can cause high server load and reduce performance because these requests are not throttled. This fix throttles these background send requests.

  • Consider the following scenario:
    • You create a custom entity that has a custom icon.
    • You create at least two records that begin with the letter "A."
    • You create a "1 to many" relationship from the custom to another entity.
    • You expose the Lookup field for the relationship to the custom entity in the related entity.
    • You log on to a Microsoft Dynamics CRM 2011 Outlook Client that connects to the environment through IFD/Claims.
    • You clear the Microsoft Internet Explorer cache.
    • You create a new record for the related entity.
    • You run the auto-resolving lookup function by using the letter "A" for the custom entity.

      In this situation, you receive a warning message that states there are multiple matching records. Additionally, the icon does not appear.
  • The Help files are updated.

  • Assume that you configure the Dynamics 2011 Client for Outlook. You browse to the Account folder or the Contact folder. In this situation, when ribbons and menus are rendered, you experience slow performance.

  • The Start Date field in the Fiscal Year Settings dialog box does not display the date that is converted according to the user time zone settings.

  • The Value for the Set this computer to be the synchronizing client in the Dynamics CRM 2011 Client for Outlook will appear to be different if you open the personal settings dialogbox by clicking the Options button in the Track In CRMpane on an email or appointment. Additionally, if you select the Set this computer to be the synchronizing client check box, the dialog box becomes unresponsive.

  • Some duplicate attribute labels exist. Therefore, it is difficult to map data on imports.

  • The Russian translations of the Create column heading and the Delete column heading are incorrect in the security role permissions.

  • When you send a Direct Email message to a large dataset, duplicate email messages are generated.

  • When you add a user in a multi-site domain, you experience slow performance after you click Save.

  • Assume that you enable the auditing for the Contact entity. If you use a Microsoft Dynamics CRM 2011 Client for Outlook, an auditing log is displayed every 15 minutes or every time that the Outlook client is synchronized with Microsoft Dynamics CRM 2011.

  • Some translations for the Slovenian language are incorrect.

  • Assume that you specify a comma (",") as the decimal separator in the personal format settings. When you enter a decimal custom value in a Duration field, the value is rounded unexpectedly.

  • When you export a static excel worksheet with non-English operating system settings, the Currency values are multiplied by 10,000.

  • When you export a Duration field to a Microsoft Excel worksheet, the value in the Duration field is displayed as text instead of as a number.

  • If an organization starts a large number of asynchronous operations, the async service allocates many resources to process those requests from the organization. In this situation, other organizations will have an increasing backlog of asynchronous operations. This fix introduces a new deployment setting to limit the number of items that can be processed by a single organization at one time.

  • Metadata cache access for one organization is blocked if another organization is loading metadata.

  • Assume that you create a contact who has a 200-character email message in Microsoft Dynamics CRM 4.0. When you upgrade the system to Microsoft Dynamics CRM 2011, you receive an upgrade error.
    When you create a contact who has a 200-character email message in Microsoft Dynamics CRM 2011, an internal server error occurs.

  • When you add a URL that contains a query string parameter to a sitemap area or a subarea in Microsoft Dynamics CRM 2011, the URL is rendered incorrectly.

  • Some Swedish language translations are incorrect.

  • Assume that you have a contact who has the Business Phone filed populated with a value. When you add a new phone call activity by using the ribbon from the Activities area, the Phone Number field is not populated in the phone call activity.

  • When you import a solution, some entities are not imported. Additionally, you receive the following error message:
    • Cannot change the max length of the owneridname attribute.
  • When you view the file properties of some files by clicking the Details tab, the value in the Company name field and the value in the Product name field are blank.

Give CRM Custom Entities a Little Visual Love

Posted by Jim Steger on July 19, 2011  |  commentsComments (1)

Since Microsoft Dynamics CRM 3.0, you could customize the icon of configurable entities. This is an often overlooked aspect of the customization process, but can bring tremendous value to your users as they can more quickly identify areas of the application based on a unique visual reference (icon).

As a reminder, Dynamics CRM 4 used 3 entity icon sizes, a 16x16 gif (thumbnail icon used in sitemap/lookups/etc), 32x32 ico (for outlook), and a 66x48 gif (for forms). However, Dynamics CRM 2011 uses only two types of icons a 16x16 (sitemap/lookups/ribbon) and 32x32 (forms/outlook) icon file. Typically, we use png files for the image file type.

In Dynamics CRM 2011, you need to first create web resources for each entity icon for each size. A couple of utilities/code samples exist in the SDK to help automate this process, so be sure to check those out if you are updating numerous entities.  Once the web resource(s) are created, click the entity in the solution explorer and you should see an Update Icons button in the toolbar.

updateicons

After you click the button, you see the Update Icons dialog page where you then associate the icon to the web resource as shown below.

updateicons_selection

Note that in CRM 2011, you will see 3 options in the dialog (including the 66x48 option), but the 66x48 is not currently used, as described here

 

iconexperience_logo

We found a company back in 2005 that provides a fantastic (and inexpensive) icon library called IconExperience. We have recently upgraded to their v2 product line which contains over 2,500 icons! The download even contains folders with icons sized for Microsoft Dynamics CRM. Even better, IconExperience provides a utility to merge and reformat their icons (it uses the Java runtime, so you'll need to install that first to get the utility to work). You can quickly create your own unique composite icons, further increasing the size of your graphics library!

iconexp_toolkit

For those of you who don't have access to a graphic design department, IconExperience and configuring custom entity icons is a great way to create a more visually appealing Dynamics CRM application in a matter of minutes!

Vibe scores Microsoft Dynamics Marketplace honor!

Posted by Mike Snyder on June 22, 2011  |  commentsComments (0)

I am excited and proud to announce that our enterprise social networking application Vibe was a finalist for Microsoft’s Partner of the Year award in the Dynamics Marketplace Solution Excellence category (official press release here)!

When we launched Vibe to the Dynamics Marketplace back in January 2011, we decided to try something unique…we gave it away for free! We believed then (and still do) that the benefits of social networking are so great that we wanted to share it with ALL Microsoft Dynamics CRM customers worldwide.

Five months after the public launch of Vibe, we couldn’t be prouder of the results:

  • Vibe is one of the top-rated applications on the Dynamics Marketplace
  • Vibe has been downloaded from 61 (yes sixty-one!) different countries
  • The Microsoft sales community frequently uses Vibe during their customer and prospect demos
  • Vibe was featured at multiple Convergence 2011 presentations regarding Social CRM
  • Sonoma Partners internal deployment of Vibe has had more than 20,000 posts in just 5 months!

We feel that this award helps formalize a lot of the success we’ve seen with Vibe, so we’re pretty pumped up!

If you’re new to Vibe, please check it out and learn how your organization might be able to use it. Otherwise you can learn more about Vibe and download it from the Dynamics Marketplace.

How to use Javascript to create dynamic cascading picklists in Microsoft CRM 2011

Posted by Mike Snyder on June 16, 2011  |  commentsComments (4)

Today’s guest blogger is Chris Labadie, technical sales specialist at Sonoma Partners.

Microsoft CRM 2011 includes some great new improvements to option sets (also referred to as “picklists”). Some of these improvements include:

  • The ability to create global option sets (where you can use the same set of picklist values in mulitple fields – perfect for things like country and state lists!)
  • The ability to filter the option set values based off configured criteria (classic example here is only show contacts related to the account when you’re setting the primary contact of the account)

Unfortunately, one popular request still can’t be accomplished web-based configuration tools in Microsoft CRM 2011 = dynamic cascading picklists. When we say dynamic cascading picklists, we’re referring to a picklist where the options change based on selections made in another picklist. In this blog post, we’ll show you how you can quickly and easily configure your own dynamic cascading picklists. There is a little code involved, but if you can search/replace then you can use these examples for yourself even if you’re not a programming guru.

Let’s consider an example where we are using the Opportunity entity to sell health insurance plans and there are two picklists- health plan type (HMO, PPO, or POS) and health plan policy (HMO 5K, HMO 7K, PPO 500, PPO 750, POS Silver, and POS Gold). If the Opportunity owner chooses PPO as the plan type, we want to update the health plan policy picklist to only display PPO policies. It should automatically hide the HMO options.

One way to accomplish this is to create two custom entities (Health Plan Type and Health Insurance Plan) and use the option set filter option configured on the form. Health Plan Type is just a basic entity with a 1:N relationship to Health Insurance Plan. When I add a Lookup field for each entity onto the Opportunity form, I can set the Health Insurance Plan lookup to be a filtered lookup. So, in the field options I can set the lookup for Health Insurance Plan to only display records that have a matching Health Plan Type as the Health Plan Type field selection on the Opportunity.

FilteredLookup

The down side to this approach is that both fields must be of a type lookup, so you have to create entities instead of picklists. There are many situations where users would prefer picklists over entity lookups and for data that is fairly static, entities might be overkill.

For those scenarios where you don’t want the overhead of creating custom entities, you can leverage Javascript to accomplish the same goal of dynamic cascading picklists. Here’s the steps on how to do this:

  • Create your picklists fields in CRM and note the options you have added to each picklist. Add the picklists to a form. For this example, I created “sonoma_healthplantype” and “sonoma_healthinsuranceplan” and added them both to the Opportunity form.
  • Copy the following code sample into notepad (or your favorite code editing program).
    • Replace “sonoma_healthplantype” with the name of your first picklist.
    • Replace “sonoma_healthinsuranceplan” with the name of your dynamic picklist.
    • In the line “if(picklistOneSelectedValue == "HMO")” replace HMO with your first selection.
    • In the line “if ( picklistTwo.Options[i].Text=="PPO 500" || picklistTwo.Options[i].Text=="PPO 750" || picklistTwo.Options[i].Text=="POS Silver" || picklistTwo.Options[i].Text=="POS Gold")” replace each value (PPO 500, PPO750, etc.) with the values you want to remove on your first selection.
    • You will have to repeat the steps above for each value you want to filter on. The “//” lines show where each filter block begin and end. You can copy/paste to add more for more values or remove blocks if you have fewer values. Make sure you add or remove the entire code block from beginning to end.
function PicklistOneOnchange() {

    var picklistOneName = "sonoma_healthplantype"; //name of the first picklist
    var picklistTwoName = "sonoma_healthinsuranceplan";  //name of the picklist with dynamic values
	
	var picklistOne = Xrm.Page.getControl(picklistOneName);
	var picklistOneAttribute = picklistOne.getAttribute();
	
	var picklistTwo = Xrm.Page.getControl(picklistTwoName);
	var picklistTwoAttribute = picklistTwo.getAttribute();
		
   	var picklistOneSelectedOption = picklistOneAttribute.getSelectedOption();
	
	var picklistOneSelectedText = "";	
	if (picklistOneSelectedOption != null)
	{
		picklistOneSelectedText = picklistOneSelectedOption.text;
	}

	//This "if" statement stores the original values from the dynamic picklist.
	//Very important if the user hasn't made a selection on the first picklist or if the selection changes
    if (picklistTwo.flag == true) 
	{
		picklistTwo.clearOptions();
		var origOptions = picklistTwo.originalPicklistValues;
		
		for (var i = origOptions.length - 1; i >= 0; i--) 
		{ 
			if(origOptions[i].text != "")
			{
				picklistTwo.addOption(origOptions[i]);
			}
		}		
    }
    else 
	{		
        picklistTwo.originalPicklistValues = picklistTwoAttribute.getOptions();
        picklistTwo.flag = true; 
    }

	if (picklistOneSelectedText != null && picklistOneSelectedText != "") 
    {		
		var picklistTwoOptions = picklistTwoAttribute.getOptions();
        for (var i = picklistTwoOptions.length - 1; i >= 0; i--) {  
			
            if (picklistTwoOptions[i].value != null && picklistTwoOptions[i].value != "") {
				var optionText = picklistTwoOptions[i].text;
				var optionValue = picklistTwoOptions[i].value;
				
				//BEGIN: If the picklist is set to HMO
                if(picklistOneSelectedText == "HMO")
				{							
					//Remove these values
					if (optionText == "PPO 500" || optionText == "PPO 750" || optionText == "POS Silver" || optionText == "POS Gold")
					{
						picklistTwo.removeOption(optionValue);
					}

				}
				//END: HMO Selection
				
				//BEGIN: If the picklist is set to PPO
				if(picklistOneSelectedText == "PPO")
				{
					//Remove these values
					if (optionText == "HMO 5K" || optionText == "HMO 7K" || optionText == "POS Silver" || optionText == "POS Gold")
					{
						picklistTwo.removeOption(optionValue);
					}

				}			
				//END: PPO Selection
				
				//BEGIN: If the picklist is set to POS
				if(picklistOneSelectedText == "POS")
				{
					//Remove these values
					if (optionText == "HMO 5K" || optionText == "HMO 7K" || optionText == "PPO 500" || optionText == "PPO 750")
					{
						picklistTwo.removeOption(optionValue);
					}

				}		
				//END: POS Selection
            }
        }
    }
	
}


  • Once the code sample is ready, save it to a file on your computer.
  • We need to create a new Web Resource for the code. Go into the Settings section-> Customizations. If you are familiar with Solutions and wish to use a Solution other than the default Solution, feel free to open that solution. Otherwise, click on “Customize the System” to open the Default Solution.
  • You will get a popup window listing all of the components in your Solution. Click on the “Web Resources” section to list the existing Web Resources. Press the New button to create a new Web Resource.
  • You will see a popup window; give your new Web Resource a name like DynamicPicklistDemo (no spaces). For Display Name, you can call it Dynamic Picklist Demo. Under Type, select “Script (JScript)”. Click the Browse button and open the code file you saved earlier.

DynamicPicklist2

  • Click the “Save and Close” button in the Ribbon to save your new Web Resource.
  • Back on the Solution window, expand the Entities section on the left hand side, expand Opportunity, and choose Forms. Double click the Form named Information to modify it.
  • On the form design, double click the picklist that filters the dynamic picklist. On the field popup window, select the Events tab. Then expand the “Form Libraries” section. Click the Add button and choose the Web Resource you created.
  • Below, in the Event Handlers section click Add and when the Handler Properties form pops up, enter PicklistOneOnchange in the Function field and press Ok to Save.

DynamicPicklist3

  • Press Ok to save the Field Settings, at the top of the form design click “Form Properties”. Repeat the step above to insert the Web Resource. Press Ok to close the Form Properties window.
  • Press “Save and Close” to save the form changes. On the Solution window, press the “Publish All Customizations” button in the top left to publish our changes.

Now let’s see this code in action! First go ahead and open the opportunity and you’ll see that ALL of the Health Insurance Plan picklist options appear. The provided code samples are a simple example to accomplish this, feel free to tailor it to your own needs.

DynamicPicklist4

Now if you select PPO for the plan type, the insurance plan picklist values update automatically!

DynamicPicklist5

The provided code samples are just one example of how to accomplish this, but hopefully you can use this example to update the code to meet your own needs! 

Integrate Microsoft CRM with LinkedIn!

Posted by Mike Snyder on June 15, 2011  |  commentsComments (4)

We just recently put the finishing touches on a pretty excellent integration between Microsoft CRM and LinkedIn! Of course you know that LinkedIn has a huge business network, and lots of businesses use LinkedIn to find and develop new relationships at customer and prospect companies. Prior to this integration, you would have to do a lot of re-typing and ALT+TAB of windows to try and work with CRM and LinkedIn at the same time. However since LinkedIn offers a programming API, we decided to mash up their database with Microsoft CRM to really save ourselves our time!

From a high level, here are the key integration points:

  • Link Microsoft CRM accounts to LinkedIn companies
  • Link Microsoft CRM contacts to LinkedIn people
  • Import your LinkedIn connections into Microsoft CRM

This YouTube video shows the integration in action!


We have not officially released this integration to the world yet, as we’re still testing and evaluating it. If you’re interested in getting the Microsoft CRM - LinkedIn integration for your company, please contact us as we’re looking for a few external beta customers to help us with the testing.

Test CRM Queries with LINQPad

Posted by Jim Steger on June 9, 2011  |  commentsComments (1)

Our development team has really enjoyed using the tool LINQPad with their CRM 2011 development. The tool allows you to easily test CRM service calls, especially queries (as opposed to registering a plugin, creating a console app, etc and finding out your query is incorrect).

LINQPad is a free tool, although you will need to pay a nominal fee to get auto-completion (including the snippet option we demonstrate in this blog post). Disclaimer: After using the free version for some time, we ended up purchasing the Premium licenses for our development staff.

My colleagues, Matt Dearing and Corey O'Brien, have helped me come up with some simple steps to use LINQPad Premium edition for testing fetch-based queries quickly and easily. The code snippet we show below sets the appropriate CRM references and import statements, and then provides a couple of code examples to quickly allow you to query a Dynamics CRM instance.

You'll see us use the CrmConnection object to provide the connection to CRM. Learn more about this object from the Microsoft CRM SDK.

Using LINQPad with Dynamics CRM

  • Download LINQPad.
  • Create a Libraries folder for LINQPad in the same directory as the LINQPad.exe
  • Add the Microsoft.Crm.Sdk.Proxy.dll, Microsoft.Xrm.Sdk.dll, and the Microsoft.Xrm.Client.dll assemblies to the newly created Libraries folder.
  • Create a file called crm2011.snippet in your\My Documents\LINQPad Snippets folder (you may need to create the folder)
  • Copy the following code:

    <?xml version="1.0" encoding="utf-8"?>

    <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">

      <CodeSnippet Format="1.0.0">

        <Header>

          <Title>CRM 2011 - Assembly, Namespace, CreateOrgService</Title>

          <Description>CRM 2011 - Provides appropriate assembly and namespace references, as well creates a org service helper method.</Description>

          <Shortcut>crm2011</Shortcut>

          <SnippetTypes><SnippetType>Expansion</SnippetType></SnippetTypes>

        </Header>

        <Snippet>

          <References>

            <Reference><Assembly>%WinDir%\Microsoft.NET\Framework\v4.0.30319\System.Runtime.Serialization.dll</Assembly></Reference>

            <Reference><Assembly>%WinDir%\Microsoft.NET\Framework\v4.0.30319\System.ServiceModel.dll</Assembly></Reference>

            <Reference><Assembly>%WinDir%\Microsoft.NET\Framework\v4.0.30319\System.Configuration.dll</Assembly></Reference>

            <Reference><Assembly>Libraries\microsoft.xrm.sdk.dll</Assembly></Reference>

            <Reference><Assembly>Libraries\microsoft.xrm.client.dll</Assembly></Reference>

            <Reference><Assembly>Libraries\microsoft.crm.sdk.proxy.dll</Assembly></Reference>

          </References>

          <Imports>

            <Import><Namespace>Microsoft.Xrm.Sdk</Namespace></Import>

            <Import><Namespace>Microsoft.Xrm.Sdk.Client</Namespace></Import>

            <Import><Namespace>System.ServiceModel.Description</Namespace></Import>

            <Import><Namespace>Microsoft.Crm.Sdk.Messages</Namespace></Import>

            <Import><Namespace>Microsoft.Xrm.Client</Namespace></Import>

          </Imports>

          <Code Language="csharp">

            <![CDATA[private IOrganizationService CreateOrgService(string connectionString)

    {

           CrmConnection connection = CrmConnection.Parse(connectionString);

     

           return new OrganizationServiceProxy(

                                   connection.ServiceUri,

                                   connection.HomeRealmUri,

                                   connection.ClientCredentials,

                                   connection.DeviceCredentials);

    }]]>

             </Code>

        </Snippet>

      </CodeSnippet>

     

      <CodeSnippet Format="1.0.0">

        <Header>

          <Title>CRM 2011 - Simple Fetch Query Example</Title>

          <Description>CRM 2011 Fetch Example - Provides code example for a simple fetch example.</Description>

          <Shortcut>fetchExample</Shortcut>

          <SnippetTypes>

            <SnippetType>Expansion</SnippetType>

          </SnippetTypes>

        </Header>

        <Snippet>

          <Code Language="csharp">

            <![CDATA[string connectionString = "Url=http://crm/orgname/XRMServices/2011/Organization.svc;";

           var orgService = CreateOrgService(connectionString);

           if (orgService != null)

           {

                  var fetchResult = (ExecuteFetchResponse)orgService.Execute(new ExecuteFetchRequest()

                  {

                         FetchXml = @"<fetch mapping='logical' aggregate='true'>

                         <entity name='lead'>

                         <attribute name='lastname' aggregate='count' alias='NumLeads'/>

                         </entity>

                         </fetch>"

                  });

           Console.WriteLine(fetchResult);

      }

                 

    ]]>

          </Code>

        </Snippet>

      </CodeSnippet>

    </CodeSnippets>

  • Run LINQpad.exe
  • Change Language to C# Program
  • Execute the crm2011 snippet (type crm2011 and hit <tab>) after the Main method.
  • In the main method create an service reference and execute your request. For instance, use the second code snippet by typing fetchExample and hit <tab> which will produce a basic query against the Lead entity.

    image

Change the http://crm/orgname value to match your environment and hit F5 to execute your query. LINQPad will return the results of the query as shown:

image

 

Some additional tips for LINQPad and CRM query development:

  • If you don't have the premium version, you can easily add the reference assemblies and import statements manually. Simply hit F4 to bring up the Query Properties window.

    image

  • Using the Query Properties window (F4), click the Set as default for new queries to keep these assembly references and namespaces as defaults for all LINQPad queries.
  • You can also save a LINQPad file with the CreateOrgService method if you like, instead of using the snippet.
  • Save common used queries and reuse them as needed.
  • Set program defaults by clicking Edit > Preferences. For instance, you can set the default query to be C# Program.

image

  • Please reference the LINQPad site for more information about the program and licensing.

Contact Us for a Quote, or Personalized Demonstrationof Microsoft Dynamics CRM for Your Business.

Contact Us