You are currently browsing the tag archive for the ‘Outlook’ tag.

Ok, so we all know, we click a link, a page loads, and voila. But what is going on behind the scenes, and especially what is going on in Dynamics CRM when working from within Outlook? Well, let’s see.

There are a few steps taking place here. They are:

  • Start the Form Load
  • Retrieve the Entity Layout and Metadata
  • Data Binding and show the form in read-only
  • Make the form read/write
  • Initialize the sub-grids and the social pane where available
  • Execute JScript web resources

As you can see, there’s quire a bit happening. Let’s look at each one of these steps in detail, to see what happens and where things could go wonky.

Starting the Form Load

First off, it all begins with a HTTP GET request. This request is issued to the main.aspx URL. The server receives the request, and responds back with an HTML response. This response contains the following items:

  • entity instance data
  • configuration values
  • scripts and css tags for references

Once all this data makes it back to the browser, global.ashx takes control and starts the execution locally.

Retrieve the Entity Layout and Metadata

Once global.ashx starts execution, first thing it does is to pull the entity metadata and layout from the browser’s cache. The layout is simple HTML.

Data Binding and show the form in read-only

Once the layout is retrieved, and the record data is available, binding these results in HTML that is being rendered and shown to the user. Here, all the data is presented on the form, in a ReadyState state. This is also called ViewReady. Note that this is read-only.

Make the form read/write

For a short period of time, if we were to slow time down and observe, the form would be in read-only mode. All data is available on the form.

In order to make all the controls presenting data read-write, some more steps need to take place. These include:

  • Download additional JScript libraries that include controls logic.
  • Execute all scripts in sequence.

Note that all scripts, once loaded, are cached on the browser. For this reason, the initial form loads are always slower that subsequent form loads.

Initialize the sub-grids and the social pane where available

At this point, Ajax requests are being sent out and data is being retrieved for all grid controls and the social pane. At this point the controls get populated with the retrieved data, and the for is ready for the user.

Execute JScript web resources

Now that the form is fully initialized, the control is passed to the web resources registered on the form. These include standard out of the box resources, as well as custom resources. At this point all your custom scripts will execute, and filters can be applied on data grids to modify the default data shown. For this reason, when loading a form you will see another blip on your screen when you have customized the data to be shown in grids.

Conclusion

As you can see, there is quite a lot happening when you simply retrieve an entity record. All these requests, all the resources being downloaded, these all take time. As such, the more data is being captured/shown on a form, the more scripts are added to a form, the connection speed, the server load, the performance of the local machine, these can all influence the overall performance from a user experience point of view.

Don’t forget: Less is More. Take a minimalistic approach to customization for better performance and user experience.

Enjoy!

Advertisements

One interesting case I had just the other day made me look like a fool. Just like in many cases, when you have issues connecting your Outlook to a CRM instance, there are a few basic steps you follow in trying to debug the issue. There is available a troubleshooting wizard at the following URL:

http://rc.crm.dynamics.com/rc/2011/en-us/online/5.0/outlook-troubleshooting.aspx

While this is helpful, one other place to go look at is the folder holding the logs on the client machine. these logs are located at various locations, depending on the version of Windows you are running and type of log you are searching. These are:

Configuration log files

Windows Path
XP C:\Document and Settings\user\Local Settings\Application Data\Microsoft\MSCRM\Logs
Vista & 7 C:\Users\user\AppData\Local\Microsoft\MSCRM\Logs

Setup log files

Windows Path
XP C:\Document and Settings\user\Application Data\Microsoft\MSCRM\Logs
Vista & 7 C:\Users\user\AppData\Roaming\Microsoft\MSCRM\Logs

 

All fine by me, but the situation I had had to do with the fact that the Outlook client was refusing to connect to my CRM instance while using IE it worked just fine. The Sync to Outlook was enable in the security role, and all looked just fine.

Finally, one of my colleagues stumbled upon an interesting piece of information. In the security role the users that could not connect had assigned, on the Business Management tab, under User Settings, we only had Read across the Organization enabled. Changing the Write setting to User allowed now all Outlook clients for the users of this group to connect.

image

Enjoy!

I’ve had a few clients already asking about this behavior. You successfully install CRM for Outlook, whether in online only or offline mode. Everything works smooth, but when you try to configure the connection, it fails with the following message:

outlook_crm_error

“There is a problem communicating with the Microsoft Dynamics CRM server. The server might be unavailable. Try again later. If the problem persists, contact your system administrator.”

You might be thinking first to go look at the logs. They are in:

C:\users\USER\AppData\Local\Microsoft\MSCRM\Logs\Crm50ClientConfig.txt

Here you will see either an LDAP error, or missing credentials, etc. You could start researching all those messages, and most of the recommendations you will find online, including the MS KB article will tell you that this behavior is related to having Windows Live Essentials 2011 installed, and that you should do a repair on it, and/or try to re-install the Outlook client. After doing that a few times, with no luck, you might start to pull your hair.

What actually worked in my case, after 2 days of unsuccessfully trying all the suggestions, is a little bit of LOGIC. Oh yeah, that…

So, if it all comes back to authentication, and almost every other time I get the missing credentials message, where are these credentials stored then? Answer: in the Credential store. How do you get to it? Click on Start, in the Run area type “Credential” (no quotes), and the first suggestion coming back is Credential Manager. Open it.

image

image

Once opened, it will look something like this:

image

In the Generic Credentials section you will most likely find a few items starting with Microsoft_CRM_xxxxxxxx. Expand each and every one of these, and make sure that the credentials stored are indeed the correct values. In my case it was relatively easy to spot the issue, as the username field was blank.

Once the proper credentials are updated, all I had to do was to re-run the configuration, drop in the proper URL in place, test the connection, and voila, all working again like a charm.

Enjoy!

Check out my course [Video]

Dynamics 365 Customer Engagement Administration

Dynamics 365 Customer Engagement Administration

Check out my course [Video]

Configuring and Extending Dynamics 365 Customer Engagement

Configuring and Extending Dynamics 365 Customer Engagement

Check out my course [Video]

Getting Started with Dynamics 365 Customer Engagement

Reviewed Book

Implementing Microsoft Dynamics 365 for Finance and Operations

Implementing Microsoft Dynamics 365 for Finance and Operations

Reviewed Book

Microsoft Dynamics 365 Extensions Cookbook

Microsoft Dynamics 365 Extensions Cookbook

Check out my Book

Microsoft Dynamics CRM 2016 Customization - Second Edition

Microsoft Dynamics CRM 2016 Customization - Second Edition

Check out my Book

Microsoft Dynamics CRM Customization Essentials

Microsoft Dynamics CRM Customization Essentials

Check out my Book

Microsoft Dynamics CRM 2011 Scripting Cookbook

Microsoft Dynamics CRM 2011 Scripting Cookbook

Reviewed Book

Microsoft Dynamics CRM 2011: Dashboards Cookbook

Microsoft Dynamics CRM 2011: Dashboards Cookbook

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 607 other followers

Follow Dynamics 365 Wizardry on WordPress.com