Issue regarding service activities resolved in UR 12

By | February 26, 2013

A while ago, we had requirement of sending an email to the users to whom service activity is scheduled. We had created a workflow which would send an email to the resources whenever they have be scheduled in for a service activity. The workflow was supposed to be triggered on create of service activity and on change of the resources field on service activity.

We were facing issues with this workflow that it was getting triggered on update of any and every field on the activity whereas the triggers defined were “on change of the resources field” and “create of SA”.

To check this issue we enabled the audit log for service activity, then updated some other field from the service activity and checked the audit log. In the audit log we came to know that the “Scheduling” event was getting triggered whenever the service activity is updated for any field.

As you can also see in the below given screen shot, the changed fields shows resource field with the same value in Old as well as New values, but actually we had updated the location field.

The service activity was getting re-scheduled (see above screen) even if the resources were not changed. As the Reschedule event was getting triggered and setting the same resource again in the resources field, the workflow was getting triggered again and again.

We have tried this on different MS CRM updates which had roll ups installed on it. There we came to know that this is the Roll up 8 and 11 issue.

To resolve the workflow issue we have written a script on the “on change” event of the “Resources” field. This script would set the pipe separated resource names in a custom field and the workflow will be triggered on the change of that particular custom field. It means when the resources are changed the script will be triggered and set the names in the custom field. And when the name is changed in the custom field our workflow of sending email would be triggered. So that whenever any other field of the service activity is updated the workflow will not be triggered.

After the release of UR 12, we have checked this on CRM with Update Roll up 12 installed on it. There we noticed that this issue has been fixed. As you can in below screen shot, instead of scheduling the service activity every time, only update event has been triggered on change of any field of the service activity.

Hope this article helps!