Link to home
Start Free TrialLog in
Avatar of David Haycox
David HaycoxFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Dynamics CRM 2011 to 2013 upgrade blocked: "web resource contains a reference to the 2007 web service endpoint"

We have a deployment of Dynamics CRM 4.0 which we are upgrading to CRM 2016.  We have set up a virtual machine each for CRM 2011, 2013, 2015 and 2016 (with all but 2016 being temporary).  We have it working successfully in CRM 2011 by backing up the SQL database, restoring, then importing the organization in Deployment Manager.

However, when following the same procedure on the 2013 we have the following error, which blocks the import:

"The JavaScript web resources in your system contain a reference to the Microsoft Dynamics CRM 4.0 (2007) Web service endpoint. The 2007 endpoints are not supported in this release. For information about how to upgrade custom code, refer to the Microsoft Dynamics CRM 2011 SDK topic "Upgrade Your Code from Microsoft Dynamics CRM 4.0 to Microsoft Dynamics CRM".
We have detected the presence of legacy component(s) during upgrade, these components are not supported in Dynamics CRM 2013. Please refer to upgrade log file ...\Microsoft\MSCRM\Logs\LegacyFeatureCheck.xml for more information.."

The LegacyFeatureCheck.xml log shows "Web resource serviceappointment_ribbon.js contains a reference to the 2007 web service endpoint".

This resource is no longer required, as far as we know - so we could either fix it, or remove it.  The people who programmed this in CRM 4.0 have left the company.

How can we either fix the error, or remove the resource so that it no longer blocks the upgrade?  We have no knowledge of CRM programming.

Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of Feridun Kadir
Feridun Kadir
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of David Haycox

ASKER

Thanks!  That's great, I'll give it a try.  Now that I know where to look though, what's required to update the code to work with CRM 2013 and beyond?  Here's the content for the resource:
function Mscrm_Isv_serviceappointment_Form_Group0_Control0_1(){

   var activityid = crmForm.ObjectId;

   var serverUrl = "/mscrmservices/2006";


   var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

   //alert(serverUrl+ "/crmservice.asmx");

   xmlhttp.open("POST", serverUrl + "/crmservice.asmx", false);

   xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8")

   xmlhttp.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2006/WebServices/Execute")

   xmlhttp.send("<?xml version='1.0' encoding='utf-8'?>"+"\n\n"+"<soap:Envelope"+

   ' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'+

   ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'+

   ' xmlns:xsd="http://www.w3.org/2001/XMLSchema">'+

   ' <soap:Body>' +

   ' <Request xsi:type="SetStateServiceAppointmentRequest"'+

   ' xmlns="http://schemas.microsoft.com/crm/2006/WebServices"> '+

   ' <EntityId>' + activityid + '</EntityId>'+

   ' <ServiceAppointmentState>Open</ServiceAppointmentState>'+

   ' <ServiceAppointmentStatus>1</ServiceAppointmentStatus>'+

   ' </Request>'+

   ' </soap:Body>'+

   ' </soap:Envelope>')

   var result = xmlhttp.responseXML.xml;

   if (result.indexOf('faultcode') < 0) {
    
    window.location.reload();    

   } else {

    alert(result);

   } 

  }

Open in new window

Ah, actually it doesn't let me delete it because of a dependency, and we don't want to delete that one.  Can we perhaps edit the dependency ("Service Activity", type: entity, state: managed) to remove the troublesome web resource?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This doesn't say very much, does it help?

User generated image
No, but it does tell me that that the web resource is linked to one of the buttons on the ribbon for the Service Activity form.
So should I try to do something with this button?  In any case I've amended the web resource as you suggested and will attempt the import to 2013 once more.
Yes, I think so - but that's probably a bit too complicated to resolve here.

Don't forget to publish after making the change to the web resource.
Fair enough.  Yes, I published the web resource.  It'll be a while now before I know if that's helped, as the database is 85GB and takes over an hour to back up and restore (that's the next job: tidy up the database). Thanks!
Yes, 85G is quite large.

It looks like you are in the UK, can you say where abouts you are located?  I'm in NW Essex.
Yes indeed: Telford, Shropshire.
Editing the code for the web resource as instructed removed the block to upgrade from 2011 to 2013.  Thanks!