Saturday 27 April 2013

Dynamics CRM 2011 – Be careful while setting up an owner of workflow in production environments

Yesterday one of my customers had discussed about the functionality of uncomforting orders, which was stopped working unexpectedly. She said that everything was working well a week ago.

This customer works on Dynamics CRM 2011 online. So, being a system administrator on the same instance, I immediately tried to login to the production server, but unfortunately she had deactivated me as she wanted to assign the same license to one of their new sales team member. So, I asked her to invite me again and provide the admin rights to validate the problem. For, this functionality I had configured a workflow (process) to activate the fulfilled order. So, on very first step I did validate the System Jobs in Settings area. Over there, I found that the some of the workflow records were sitting in listening (waiting) mode, while some had executed successfully.

Upon further inspection, I had discovered that the waiting mode workflows were still owned by me. As she deactivated me on the production server, all the workflow jobs were waiting for me to be activated again. So, we instantly changed the owner of those workflows and resume the workflow jobs. Voila! Everything started working well then.

Hence, the learning is, we should not own the workflows in production environment of our customers, so that they do not face the above problem.

I hope this would be helpful.

Friday 12 April 2013

Vote me for "2013 TOP 100 MOST INFLUENTIAL MICROSOFT DYNAMICS PEOPLE"

Hello everybody,

I would like to draw your attention to the Microsoft Dynamics Most Influential Top 100 List for 2013.

I am pleased to tell you that I have been nominated and that we are now in the voting process.

If you believe that I deserve it then please spare a few seconds time and take part in below voting poll by giving your invaluable vote to “Ankit Shah”.

http://www.dynamicsworld.co.uk/the-top-100-most-influential-people-in-microsoft-dynamics-list-for-2013-page-1/

Saturday 6 April 2013

Dynamics CRM 2011 – Send an e-mail on a specific date

 

Currently, I came across a scenario where we had to configure a workflow to send an e-mail on a specified date value on an opportunity entity. On opportunity entity I had a date field “Date 1” and what we were required to do was to send an email to opportunity owner on a date specified in the Date 1 field value. To achieve this, I can configure a workflow with timeout or wait condition set on the Date 1 value.

First, I tried to make it work using the Timeout criteria but it seemed to fail our requirements when the date value is null. So, I decided to work with wait condition.

Following are the steps configured in workflow to meet the requirements:-

image

Step 1: Start workflow on Record Created and Record Fields change. In Record fields change select the Date1 field.

Step 2: Check if Date1 field is null. If the field is null then no need to set any wait condition.

Step 3: Since we have fired this workflow on field change also, we had to make sure that there should not be more than one workflow with wait condition. When opportunity record is created and Date 1 field contains data, a workflow record would be created in wait mode. At the same time, if somebody modifies the date 1 value for the same opportunity record then another workflow record should not be crated in waiting mode to be executed on that particular updated date value. Instead, the previously created workflow should be updated with new value. To achieve this we have taken a custom attribute here DateValue which is a two option field. Default value of DateValue is false. Once a date is entered the value of datevalue gets updated to true. This way we ensure that on field change we don’t create a new wait condition if one already exists.

Step 4: If the attribute value is false means there is no previously existing system job with wait condition. So, Add step of wait condition and set process execution time on or after the Date1 value. If the value is true means the workflow record was already created and nothing to do in that scenario.

Step 5: Add a Send Email step and configure required values.

I hope this would be helpful.