A few weeks ago I experienced something strange in CRM 2011. I created a HTML webresource, added to the form, but some users could not see the resource. When they tried to open the webresource the following screen appeared while opening the following URL:

http://crmd.customer:5555/WebResources/ag_/searchaffiliatedialog.html

notfound

I’ve check the security roles, tried with different users on different machines, cleared the cache, modified my test user to the same of the users with the error… But nothing worked.

 

Finally the reasons seemed to be that there was no organization specified in the URL. So changing:

http://crmd. customer.intranet:5555/WebResources/ag_/searchaffiliatedialog.html

to:

http://crmd. customer.intranet:5555/organisation/WebResources/ag_/searchaffiliatedialog.html

fixed the problem.

 

But of course, that doesn’t explain why this only happened to specific users. The reasons is that when no organization is specified in the URL, CRM picks the default organization for the signed in user. DefaultOrganizationId is a field in the “systemuser” table that is set for each user. To change this you can follow those steps:

  1. Go to SQL Server where MS Dynamics CRM 2011 installed:
    USE MSCRM_CONFIG
    SELECT *
    FROM organization

    You can find the list of organization in your CRM.

  2. Find the User’s Systemuserid. You can also find the user GUID using this query:

    USE Your_Organization_MSCRM
    SELECT      systemuserid
    FROM        systemuserbase
    WHERE domainname = ‘domain\user’

    For example: systemuserid = <6893E7A3-62B8-E011-AA60-000C292CBBE1>
  3. Find the User’s ID:

    USE MSCRM_CONFIG
    SELECT      userid
    FROM        systemuserorganizations
    WHERE             crmuserid = ‘6893E7A3-62B8-E011-AA60-000C292CBBE1’

    For example: User ID = <E0437EA7-9B8B-E011-9245-000C292CBBE1>
  4. Find the appropriate user in the systemuser table

    SELECT *
    FROM        systemuser
    WHERE             id = ‘E0437EA7-9B8B-E011-9245-000C292CBBE1’
  5. Update the systemuser table to reflect the desired defaultorganizationid

    USE MSCRM_CONFIG
    UPDATE     SystemUser
    SET        DefaultOrganizationId = ‘6893E7A3-62B8-E011-AA60-000C292CBBE1’
    WHERE      id = ‘E0437EA7-9B8B-E011-9245-000C292CBBE1′

  6. Run IISRESET and access the MS Dynamics CRM 2011

Hope this helps to keep you productive!

Leave a Reply

Your email address will not be published. Required fields are marked *