Friday 31 August 2012

Dynamics CRM 2011 – Change execution time of Recurring System Jobs

Recently, I needed to change the time for asynchronous Goal Roll-up job. Dynamics CRM allows us to adjust the frequency in hours for this job via System Settings – “Goals” tab. Over here we are having two options, roll-up expiration time in days & roll-up recurrence frequency in hours (by default 24 hours).


What I wanted to do is to change the time for Goal roll-up execution, say configure the execution time to mid night or in off hours. Now, the question from where can I validate the current execution time?

You can validate the execution time of all recurring system jobs from Settings tab – System – System Jobs


Change the view to Recurring System Jobs, as highlighted in below screenshot


Here, in above scenario Goal Roll-Up system job is executing everyday on 12:30 PM. Back to my concern, I would like to change this time to mid night or to off hours. So, how to change the time?


You can change the execution time for Goal Roll up System job by updating its entry directly from SQL which is an unsupported way.

To implement this first of all find out the AsyncOperationId of the job you want to update.

SELECT [MessageName]      
  FROM [Your_ORG_Name_MSCRM].[dbo].[AsyncOperationBase]
  WHERE OperationType=40 and StatusCode=10

In our case the operation type is 40 for Goal Roll Up. To get required Operation Types and Status code you can refer below MSDN link.

Get the AsyncOperationId and execute the below update query

Update [Your_ORG_Name_MSCRM].[dbo].[AsyncOperationBase] set
RecurrenceStartTime = '2011-12-09 00:00:00.000',
postponeuntil = '2013-02-02 00:00:00.000'
WHERE AsyncOperationid = '4D1D25D5-8A71-4E31-BAB5-D1866147E5DB'

Note : In above queries replace “Your_ORG_Name_MSCRM” with your database name. 

In above query “Postponeuntil” is the date time field which indicates when the next this job will run. It is in UTC format. So suppose, for GMT + 5:30 time zone (India time zone) if I want to schedule Goa Roll Up job then the value of this field should be set as specified above i.e." 2013-02-02 00:00:00.000”

“RecurrenceStartTime” field which will be used to set next runtime of job. Here the date part is not important as long as it is set in the past.

In below screenshot you can verify that I have successfully updated the roll up time to 5:30 AM.


Friday 17 August 2012

Steps to change Server URL/Machine name after deploying Dynamics CRM 2011

Recently, I came across a situation where I needed to rename my development machine having MS Dynamics CRM 2011 & SQL server 2008 installed on it. If you change the machine name casually then you will not be able to browse any of the existing organizations. Also, the CRM Asynchronous service won’t be started.

Ideally, there are only 3 simple steps, which if followed correctly, can bring all Organizations again up & running with a new url. Below are the steps –

Word of Caution: Please take backups of your registry and Database before making any change to them or take help of the concerned Administrator to help you.

1. Rename the Machine

  • Rename the Machine and change it IP Address if required.
  • Restart the machine.

2. Update the Registry entry

  • Open the Registyr Editor using - Start > Run > Regedit.exe
  • Then Move to KEY_LOCAL_MACHINE\Software\Microsoft\MSCRM node and
    • Double Click on configdb key and change the DataSource from OldServerName to NewServerName
    • Double Click on ServerUrl key and change the URL to point to the NewServerName

3. Update the details in MSCRM_CONFIG database

  • Open SQL Server Management Studio and run the below script -
UPDATE [Server] SET [Name] = 'NewServerName';
UPDATE ConfigSettings SET [HelpServerUrl] = 'http://NewServerName:5555/';
UPDATE Organization SET
[ConnectionString] = REPLACE([ConnectionString],'OldServerName ','NewServerName’),
[SqlServerName] = 'NewServerName ', 
[SrsUrl] = 'http://NewServerName /reportserver';

  • Restart the machine.

Disclaimer: Following of the above steps is purely the reader’s sole decision and in no case the author could be held responsible for loss of any kind arising after following.

Referred Link:

Saturday 11 August 2012

A new add-on Dynamics CRM 2011 - Registered Events


We are pleased to announce our new add-on of Dynamics CRM 2011 – Registered Events.

Please visit below link to get more details about this add-on.