Dynamics CRM 2011/2013: Change web address

One of the most common tasks with a Dynamics CRM installation must be to change the web address (URL) to a user-friendly host header. But documentation on how to is hard to find. Here’s how I did it.

Thanks to: http://social.microsoft.com/Forums/en-US/b829d747-ff8c-435f-ad82-01dc2bca60b9/crm-2011-change-url?forum=crmdeployment

  • Update the IIS bindings for the CRM 2011 website on the server running CRM to the new value you want to use
    • Open IIS Manager
    • Select the Microsoft Dynamics CRM website
    • Click ‘Bindings’ in the action panel at the right of the screen
    • Select the binding to modify
    • Click ‘Edit’ and modify the host name and port to the new value.
    • Close the dialog and IIS Manager.
  • Update the ServerURL registry entry with the new URL you want to use. The registry entry can be found at KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM. Note that the key value should be of the form http(s)://<New URL>:<Port Number>/MSCRMServices
  • Modify the global settings for CRM from within the Microsoft Dynamics CRM Deployment Manager*:
    • Start the Microsoft Dynamics CRM Deployment Manager
    • Right-click on the ‘Microsoft Dynamics CRM’ entry at the top of the left pane of the window shown
    • Click ‘Properties’
    • Select the ‘Web Address’ tab on the dialog which is shown
    • Modify the addresses shown appropriately. Note that if the binding type is modified from HTTP to HTTPS you will need to install the appropriate certificate into IIS as well.
    • Click OK to close the dialog and close Microsoft Dynamics CRM Deployment Manager
  • Restart the Microsoft Dynamics CRM Asynchronous Processing Service, or restart the server
  • Make sure you have set your SPN’s correctly. Add SPN for the domain account running your CRM applicationpool. I needed three SPN records to make it work. Without all of them I received a Not Authorized error. “Error 401. The requested resource requires user authentication” 

    • Add them by running command “SETSPN -A HTTP/crm.domain.com DOMAIN\CRMServiceAccount
    • I needed: HTTP/computername, HTTP/computername:5555 and HTTP/crm.domain.com
  • Then Add entry to DNS :

sth, crm, dev, auth, to indicate to server IP

  • Then go to registry:

In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value.
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1, and then click OK.
Quit Registry Editor, and then restart your computer.

(I believe this last step is only necessary to browse the friendly URL from the server)

Advertisements

CRM 2011 report wizard bug

Error:

Reports generated by the CRM Report Wizard fails to run after being modified a couple of times.

The SQL Server Reporting Services log reads:

An exception has occurred in data set ‘DSMain’.

Cannot read the next data row for the dataset DSMain.

Number of link entities in query exceeded maximum limit.

Cause:

Duplicate link-entity lines have been inserted in the query of the RDL file by the Wizard.

Solution:

This is a bug in Microsoft Dynamics CRM 2011 Rollup 16. MS Support is on the case, hoping for a hot-fix soon. -UPDATE- This issue will be fixed in Rollup 17 due to be released by late April. – UPDATE-

Workaround:

You can temporarily extend the number of link entities in query exceeded maximum limit by using this unsupported method:

INSERT INTO DeploymentProperties(Id,ColumnName,IntColumn,Encrypted)
VALUES(’98C49E91-545E-E211-85CE-000C29DF81DE’,’QueryLinkEntityLimit’,20,0)

select * from DeploymentProperties where ColumnName=’QueryLinkEntityLimit’

Thanks to: http://www.comunidadcrm.com/2012/09/28/fetchxml-error-crm-2011-number-of-link-entities-in-query-exceeded-maximum-limit/

CRM 2013 Easy way to find a GUID

I you want to find the guid (id) of an entity record in CRM 2013 do this:

1) Right-click the record in a list, for example a Contact, and select “Open in a New Window”.

2) The URL of the page will now display in the address bar. Copy the URL to notepad:

https://orgX.crm4.dynamics.com/main.aspx?etc=2&extraqs=&histKey=417109192&id=%7b4362F996-893C-E311-9B5D-6C3BE5BEEF3C%7d&newWindow=true&pagetype=entityrecord&sitemappath=MA%7cCustomers%7cnav_conts#840474163

3) Now select the text between “&id=%7b” and “%7d&newWindow” since this is where you’ll find the GUID: 4362F996-893C-E311-9B5D-6C3BE5BEEF3C

 

CRM 2011 Rollup 15 setup issues

clip_image002clip_image002[4]

We received following error messages when updating to Rollup 15:

Action.Microsoft.Crm.Setup.Common.Update.DBUpdateAction failed.

Cannot drop the procedure ‘p_GetAllOrgsFromAuthInfo’, because it does not exist or you do not have permission.

Cannot drop the procedure ‘dbo.p_DisableCreateUser’, because it does not exist or you do not have permission.

After finding more info here we solved this by dropping the procedures and letting the setup re-create them.

CRM 2011 Close Quote Dialog Box customization

Here’s how to change the default value from “Create a revised quote” to “Do not revise this quote” in the Close Quote dialog box.

  1. Find the file dlg_close.aspx in folder %programfiles%\Microsoft Dynamics CRM\CRMWeb\SFA\quotes and backup a copy of it.
  2. Edit the file and insert the following script lines at:

Sys.Application.add_load(function() {
//Custom code to set default radio button Daniel Bergsten 130902
document.getElementById(“rdNoRevisedQuote”).checked = true;
document.getElementById(“rdCreateRevisedQuote”).checked = false;
//130902

Continue reading

CRM 2011 Javascript sample – roles and events

CRM 2011 Javascript sample code for catching an onSave event and prevent the event from happening unless the user belongs to a certain security role.

In my example the “Cancel Sales Order” event is caught and prevented by calling the function CatchCancelEvent on the onSave method of the Sales Order form with the execution context passed as the first parameter.

Continue reading