The Curious Case of the Never Ending OData Request and How SQL Profiling Saved the Day

Posted by Matt Weiler on April 2, 2012 in   |  Microsoft Dynamics CRM 2011  |  commentsComments (0)

Today's guest blogger is BJ Dibbern, a Developer at Sonoma Partners.

Just the other day a coworker and I were attempting to track down a request to CRM 2011’s OData service from Silverlight that just would not complete. We first noticed that a very simple update request was taking forever to finish and assumed there must be some sort of error happening that was not bubbling up through the user interface. We went down a long path to troubleshoot this issue, and this is our tale.

We started by first opening up Fiddler to check and see if there was actually an error occurring and it wasn’t bubbling up correctly. We’ve previously covered using Fiddler to help with troubleshooting problems in CRM, and you can reference that here (http://blog.sonomapartners.com/2012/01/fiddling-with-crm.html). However, we sat and watched the request, and it just never completed, just as it looked in the UI.

This was really strange as one would assume that the request would eventually time out; but today this was not the case.

For our next step, we headed over to the CRM Web Server to check its Event Viewer for any sign of error or warning occurring around the time of the request. While there was not anything explicitly listed in the Event Viewer, we did end up finding an event around that time. When we looked at the attached log, we found a detailed error stating: “Generic SQL Error”.

If you ever find yourself faced with a “Generic SQL Error”, it is far better to start with a SQL trace directly on the database as opposed to a CRM trace. Conceptually this makes sense as the error itself is actually occurring in the database.

We ended up heading off for the SQL Profiler in order to run a trace against the database. This can be done following the steps below.

1. Open the SQL Server Profiler. This can be found in the start menu under Microsoft SQL Server 2008 –> Performance Tools.

2. Select File –> New Trace.

3. Connect to the SQL Server in question.

4. On this screen’s General tab you can enter a name for the trace if you desire, and use a template if you have created one previously. Note that these instructions assume that you do not have a template setup already.

image

5. Go to the Events Selection tab.

6. Here you can start to select the events you would like to monitor. Filtering this down and checking individual events one at a time will help you be able to better hone in on your problem, but for now, we’ll select a bunch of events that are relevant.Note that for each event, if you check the box on the far left, the profiler will automatically select all the other columns on the right. Below you will find some suggested events from each category to monitor

a. Errors and Warnings: Exception, User Error Message.

b. Stored Procedures: RPC Completed, SP:StmtCompleted, SP:StmtStarting.

c. Locks: Lock:Deadlock, Lock:Deadlock Chain, Lock:Timeout, Lock:Timeout (timeout > 0).

d. TSQL: SQL:StmtCompleted, SQL:StmtStarting.

image

7. After selecting all your desired events to monitor, select the Column Filters button in the lower right hand corner of the window.

8. In the Column Filters window, select DatabaseName from the list on the left, and under Like enter the name of the desired CRM Organization’s database to be monitored. Performing this step will make sure you are only monitoring the data that is relevant to what you’re trying to troubleshoot.

image

9. Next you can click OK to get out of the Column Filters window.

10. Before you actually click Run to start the trace, you want to make sure you’re setup to reproduce the error message. Once ready, click Run in the SQL Server Profiler, then perform the action in CRM that causes the error. You will be able to Start, Pause, and Stop the trace from the toolbar in the main window of SQL Server Profiler.

We were able to monitor the errors and watch them happen during the trace. From here we were able to correlate what was being logged and determine that there was a process that was still running that held a lock on the table we were trying to access. We found a Lock:Timeout (http://msdn.microsoft.com/en-us/library/ms189107.aspx) event in the trace and this lead us to the fact that, as the event indicates, there was a process currently running that had a lock on the table and was causing our OData queries from Silverlight to fail.

Fair warning here that these methodologies were used on a development environment, and thus data integrity was not a huge concern. These methods should be used with caution and should be thoroughly evaluated by all parties involved before applying to a production environment.

After running a simple query we were able to verify that a query did have a lock on the table and had been running for several hours. Since we knew the table we were looking at did not have any long running processes that should’ve been occurring, we knew we could kill the process. After we killed the process, things thankfully returned to normal. We followed the following steps to retrieve that currently running process and then to kill it.

1. Open SQL Server Management Studio.

2. Connect to the SQL Server in question.

3. Create a new Query.

4. Execute the SQL statement below to display a list of all currently running transactions.

5. If you encounter a long running transaction that you’d like to end, just run a new statement, “KILL [sessionId]”, where [sessionId] is the Numeric identifier of the session you’d like to end.

SELECT TOP 100
   r.[session_id],
   c.[client_net_address],
   s.[host_name],
   c.[connect_time],
   [request_start_time] = s.[last_request_start_time],
   [current_time] = CURRENT_TIMESTAMP,
   r.[percent_complete],
   [estimated_finish_time] = DATEADD
       (
           MILLISECOND,
           r.[estimated_completion_time], 
           CURRENT_TIMESTAMP
       ),
   current_command = SUBSTRING
       (
           t.[text],
           r.[statement_start_offset]/2,
           COALESCE(NULLIF(r.[statement_end_offset], -1)/2, 2147483647)
       ),
   module = COALESCE(QUOTENAME(OBJECT_SCHEMA_NAME(t.[objectid], t.[dbid])) 
       + '.' + QUOTENAME(OBJECT_NAME(t.[objectid], t.[dbid])), '<ad hoc>'),
   [status] = UPPER(s.[status])
 FROM
     sys.dm_exec_connections AS c
 INNER JOIN
     sys.dm_exec_sessions AS s
     ON c.session_id = s.session_id
 LEFT OUTER JOIN
     sys.dm_exec_requests AS r
     ON r.[session_id] = s.[session_id]
 OUTER APPLY
     sys.dm_exec_sql_text(r.[sql_handle]) AS t
 WHERE
 s.status like '%running%'
ORDER BY session_id desc

 

While we weren’t able to uncover why that process had never completed, we were at least able to end the process, and we haven’t had the problem since.

Light “spackling” for your Activity Feed walls

Posted by Sonoma Partners on December 30, 2011 in   |  Microsoft Dynamics CRM 2011,   |  Vibe Social Networking  |  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.

 

Document Assembly & Management, the One Stop Shop!

Posted by Sonoma Partners on October 26, 2011 in   |  Microsoft Dynamics CRM 2011  |  commentsComments (2)

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!

Some Assembly Required – Unmanaged Solution Gotchas

Posted by Kristie Reid on September 20, 2011 in   |  Microsoft Dynamics CRM 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!

Is your Microsoft CRM Ribbon missing in Outlook?

Posted by Matt Weiler on August 22, 2011 in   |  Microsoft Dynamics CRM 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!

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

Posted by Sonoma Partners on August 16, 2011 in   |  Microsoft Dynamics CRM 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 in   |  Microsoft Dynamics CRM 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 in   |  Microsoft Dynamics CRM 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.

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

Posted by Mike Snyder on June 16, 2011 in   |  Microsoft Dynamics CRM 2011  |  commentsComments (9)

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 in   |  Microsoft Dynamics CRM 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.


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

Contact Us