Tuesday, June 29, 2010

How to Resolve time-out issues in Dynamics CRM

There have been times when you received the service timed out error when performing operations that take a long time to complete.

Apart from the keys in the web.config found in the CRM web root folder

httpruntime executiontimeout="300" maxrequestlength="8192"

Where you can change the execution timeout to wait for a longer duration, another option that developers can use to take care of this issue in their code, is set the Timeout property of the CRM service when creating the CRM service object.

This can be done as follows

service.Timeout = 300 * 1000; // This property takes time in milliseconds

For more on timeout you can check the following KB article posted on this http://support.microsoft.com/kb/918609

Thursday, June 24, 2010

How to allow a single resource to be scheduled for multiple activities at the same time

CRM has this great scheduling feature that lets you schedule resources for a job based on the availability as well as the skill set (service) being required to perform the job.

You can associate a user with a particular service through the Required Resources Tab. Once you have the user selected in the selection rule for a service, they become eligible for selection in the scheduling process.

The scheduling engine also checks the availability a resource may not be found by the scheduling engine if they are already assigned another job for the same time. This is to avoid scheduling conflicts and makes perfect sense.

Say you have a Project Manager that can overlook more than one task at a time and hence can be scheduled for more than one activity at a time, such resource scheduling would not be possible in Dynamics CRM, unless you specify the capacity of the resource. By specifying the capacity of a resource, you let the scheduling engine of CRM know that these resources can handle more than one job at a time and hence can be selected for as many activities at the same time as is their capacity.

To set the capacity of the a resource, you need to set the Working hours of a user. You need to setup a new Weekly Schedule. In the window that popups

Select the Set Work Hours Hyperlink to bring up the following window

Click on the Show Capacity button, to bring up the Capacity column

With this done, now the user will be made available for selection for 2 simultaneous activities.

After scheduling 2 simultaneous activities, calender will show both activities and will not conflict. See below,

Tuesday, June 8, 2010

How to send email through email template which contains image links in email body

Once we observed that creating a new email activity using an email template with some images in its body does not come through properly and only image links appear in the body.
During our research, we found another way to send an email with the above same email template in it. The steps to perform this are as follows:

· Instead of creating new email from Activity -> New -> Email, create the email from the grid of the entity’s record to whom the email is to be sent.

· Suppose, an email is to be sent to a particular contact, then go to contacts grid -> select that particular contact and then click on “Send Direct E-mail” button seen on the grid’s menu.

· This will ask the user to select an email template and here select the same template with images in it as was mentioned above.

· The email sent can be checked from that contact’s history and user can find that all the images come through perfectly.