Thursday, December 2, 2010

When is the Default Organisation not the Default Organisation

David Jennaway has a great article on the CRM community site that discuss when the default organization is not the default organization. This is something that a number of CRM users get confused about and David does a great job of explaining how this works. Read the article at

Monday, November 29, 2010

MSCRM System Jobs Continuously in Waiting State

If you ever come across the issue of your system jobs always being in a waiting state, you may want to verify some values in the MSCRM_CONFIG.dbo.DeploymentProperties table. To verify the data you will need to run the following query against SQL.

from DeploymentProperties
where ColumnName IN ('ADSdkRootDomain', 'ADWebApplicationRootDomain', 'AsyncSdkRootDomain');

This query should return three rows each containing data looking something like crmserver:5555.  Where crmserver is the name of the server where you have deployed CRM and 5555 is the port the CRM website is configured to use.  If the data returned is null or incorrect you can run the following query to update it

Update DeploymentProperties
Set NVarCharColumn = 'crmserver:5555'
Where ColumnName IN ('ADSdkRootDomain', 'ADWebApplicationRootDomain', 'AsyncSdkRootDomain')

Friday, November 5, 2010

CRM SQL Table Information

Came across a great article on the CustomerEffective blog today about getting information on CRM SQL table sizes.  The provided query will tell you the number of records in each table and the size of each table.  You can find the article at

Monday, October 11, 2010

MSCRM in Chrome Browser

Have you ever wanted to use CRM from a browser other than IE?  Well with the help of the IE Tab extension for Google's Chrome browser you can view MSCRM within Chrome.

So if you like to use Chrome and do not like jumping back and forth between IE and Chrome, install the IE Tab extension and you can use MSCRM from you Chrome browser.

Monday, October 4, 2010

AccessRight and PrivilegeDepthMask Columns in dbo.PrivilegeBase and dbo.RolePrivilege

The table dbo.RolePrivileges in the MSCRM database contains a table named RolePrivileges.  This table defines the privilieges given to each security role in CRM.  Within this table is a column labeled PrivilegeDepthMask, which defines the scope of the privilege.  Below is table that list the scope granted by each value that is valid for this column

Value Scope
1 User
2 Business Unit
4 Parent: Child
8 Organisation

Now the records in the dbo.RolePrivileges table are linked to dbo.PrivilegeBase which contains a column labeled AccessRight.  The value of this column defines the action the privilege is associated to.  Below is a table that list the action granted by each value that is valid for this column

Value Action
1 Read
2 Writet
4 Append
16 Append To
32 Create
65536 Delete
262144 Share
524288 Assign

Thursday, September 30, 2010

'Automation server can't create object' JavaScript Error

Occasionally I run into a user that gets the Automation server can't create object error message. This is typically caused by a method in JavaScript that attempts to create an ActiveXObject for something like evaluating XML or creating a GUID by using the Scriptlet.TypeLib ActiveX object. To address this issue you need to go to

Internet Explorer Tools > Internet Options > Security > Local Intranet

and hit the ‘Custom level...’ button (IMAGE 1).  This will cause the 'Security Settings - Local Intranet Zone' (IMAGE 2) to display.  From this form you need to scroll down to the 'ActiveX controls and plug-ins' section and then enable the

Initialize and script ActiveX controls not marked as safe for scripting

and then click the OK button on the form.  Then click the Apply button on the Internet Options form and restart Internet Explorer to have the changes take effect.  Most times this will address this issue and allow the JavaScript on the form to work.



Thursday, September 16, 2010

Bit field events

Are you struggling to get the onchange event to fire on a checkbox or radio button? Are you clearing your cache and refreshing your page and seeing no results? Well just the other day one of the other members on my team was having this issue and he came to me for some help. He had something like this
crmForm.all.new_bit.onchange = function() {
  alert(“I changed”);

and could not understand why he was not getting the alert when he clicked on the radio buttons for the bit field.

It only took me a second to see what was happening. First the onchange event will not fire until the radio button group looses focus or the blur() event is called on the radio button. After explaining this to my teammate I got the next logical question of, “Well how do you make the event fire when the user clicks on the radio button?” This was an easy one to answer, I said, “Replace onchange with onclick.” So he changed his to code to look like this
crmForm.all.new_bit.onclick = function() {
  alert(“I changed”);

So to recap for a checkbox or radio button
  1. onchange does not fire until radio button looses focus or blur() is called
  2. Use onclick if you want an event to fire as soon as a radio button is clicked.

Sunday, September 5, 2010

Load External JavaScript a.k.a. Dynamic JavaScript

The script below will dynamically load a JavaScript script file to a form in MSCRM 4.0 and is functioning as of RollUp 11.  You will need to add this to the onload event of the form and ensure that you have checked the checkbox for enable onload event.  Please note that this is not supported by Microsoft and may not function if you apply a future release of MSCRM or any rollup after Rollup 11 for MSCRM 4.0

//Create a variable to hold the path to the file you want to load.  In this case I am loading my Global.js file which contains a number of functions that I use on a number of my pages
var url = '/ISV/Global.js';

//Create the ActiveX object which will load the *.js file
var x = new ActiveXObject("Msxml2.XMLHTTP"); 

//Get the file and eval it'GET', url, false); x.send('');

//Break the file done by line breaks
var s = x.responseText.split(/\n/); 

//Regular expression
var r = /^function\s*([a-z_]+)/i; 

//Eval each line of the returned file.  Once this is done the loaded *.js file will be available
for (var i = 0; i < s.length; i++) 
  var m = r.exec(s[i]); 
  if (m != null) {
    window[m[1]] = eval(m[1]);