Support Portal ContactGet in touch

Upgrading CRM 2011– Fix getServerUrl Script Error

   Words by CRM Consultancy

   on 25/08/2016 10:00:00


When upgrading Custom Javascript in CRM from CRM 2011 to 2013 and beyond, most script will migrate across just fine.

(on the proviso that any of your Javascript is in CRM 2011 format, and not depending on the old depreciated CRM 4 model!)

However one quick piece of information that may help when upgrading is that the .getServerUrl() method of the Xrm Context is no more – replaced by .getClientUrl()

CRM 2011


Now becomes:

CRM 2016


Most other areas of the Xrm Context map across from 2011 fine, however here the Context is clearly worded in mind of On-Premise and so not fitting with the Cloud vision for CRM, and so we can see why this has been changed.

For more information on the changes in Scripting for CRM 2016, the following MSDN resource may be useful:

  • "Paul has made a real difference to how my team of 24 people record and store valuable customer data and sales opportunities. Highly recommended."

    James, Operations Director

  • "Understanding your business allows us to advise when to implement aspects of CRM and, likewise, when not to."

    Paul McQuillan, Managing Director

  • "Dynamics 365 and CRMCS have made a real lasting difference to our business, allowing us to replace older systems that were holding back our performance."

    Grahame, Chief Operating Officer

  • "James worked well with us to help connect CRM with Outlook and relate how this might benefit our team using CRM for Property Care."

    Natalie, Property Care Supervisor

  • "Matt was really good with helping us run User Testing on the new Compliance Module of our CRM System."

    Tom, Compliance Administrator

Prefer to go old-school?

Write to us using the below addresses.

Head Office
CRM Consultancy
61 Oxford Street
M1 6EQ

London Office
CRM Consultancy London
Grosvenor Avenue

Content © CRM Consultancy.