web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Web resource contains a reference to the 2007 web service endpoint

(0) ShareShare
ReportReport
Posted on by 12,163

Which I assume is this: /mscrmservices/2007/crmservice.asmx.

How do I update it to the 2011 endpoint? Is it the Organization Service or the Organization Data Service? Is it the full URL? e.g. https://crmurl/orgname/2011/organization.svc

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Inside of CRM if you go to Settings -> Customizations -> Developer Resources

    You can see the Service Endpoints.  The one you want is the Organization Service.

    Hope that helps.

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    The old 2007 endpoint has a different schema to the new 2011 endpoint, so you'll need to change your code as well. I recommend using a library such XrmSvcToolkit or the XrmServiceToolkit.

    hth,

    Scott

  • Community Member Profile Picture
    on at

    Hi, can you point out the issues in this function

    function copyaddress() {

       try {

           // Copies address information from shiptocontact to shiptoaddress fields

           var shipcontact = new Array();

           shipcontact = Xrm.Page.getAttribute("new_shiptocontact").getValue(); //new_information is a relationship's name

           //if (shipcontact[0]!=null)

           if (shipcontact != null) {

               var contactid = shipcontact[0].id;

               var authenticationHeader = GenerateAuthenticationHeader();

               var xml = "<?xml version='1.0' encoding='utf-8'?>" +

    "<soap:Envelope xmlns:soap='schemas.xmlsoap.org/.../&;" +

    " xmlns:xsi='www.w3.org/.../XMLSchema-instance&;" +

    " xmlns:xsd='www.w3.org/.../XMLSchema&;>" +

    authenticationHeader +

    "<soap:Body>" +

    "<Retrieve xmlns='schemas.microsoft.com/.../WebServices&;>" +

    "<entityName>contact</entityName>" +

    "<id>" + contactid + "</id>" +

    "<columnSet xmlns:q1='schemas.microsoft.com/.../Query&; xsi:type='q1:ColumnSet'>" +

    "<q1:Attributes>" +

    "<q1:Attribute>address1_line1</q1:Attribute>" +

    "<q1:Attribute>address1_line2</q1:Attribute>" +

    "<q1:Attribute>address1_city</q1:Attribute>" +

    "<q1:Attribute>address1_stateorprovince</q1:Attribute>" +

    "<q1:Attribute>address1_postalcode</q1:Attribute>" +

    "<q1:Attribute>address1_country</q1:Attribute>" +

    "<q1:Attribute>telephone1</q1:Attribute>" +

    "<q1:Attribute>emailaddress1</q1:Attribute>" +

    "</q1:Attributes>" +

    "</columnSet>" +

    "</Retrieve>" +

    "</soap:Body>" +

    "</soap:Envelope>";

               // Prepare the xmlHttpObject and send the request.

               var xHReq = new ActiveXObject("Msxml2.XMLHTTP");

               xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);

               xHReq.setRequestHeader("SOAPAction", "schemas.microsoft.com/.../Retrieve&quot;);

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

               xHReq.setRequestHeader("Content-Length", xml.length);

               xHReq.send(xml);

               // Capture the result.

               var resultXml = xHReq.responseXML;

               // Check for errors.

               var errorCount = resultXml.selectNodes('//error').length;

               if (errorCount != 0) {

                   var msg = resultXml.selectSingleNode('//description').nodeTypedValue;

                   alert(msg);

               }

               else {

                   // Blank fields before editing new values

                   Xrm.Page.getAttribute("new_shipaddress1").setValue("");

                   Xrm.Page.getAttribute("new_shipaddress2").setValue("");

                   Xrm.Page.getAttribute("new_shipcity").setValue("");

                   Xrm.Page.getAttribute("new_shiptostate").setValue("");

                   Xrm.Page.getAttribute("new_shipzip").setValue("");

                   Xrm.Page.getAttribute("new_shiptocountry").setValue("");

                   Xrm.Page.getAttribute("new_phone").setValue("");

                   Xrm.Page.getAttribute("new_email").setValue("");

                   // var a=resultXml.selectSingleNode("//q1:address1_line1").nodeTypedValue;

                   // if(a!=null || a!=""){

                   //  Xrm.Page.getAttribute("new_shipaddress1").setValue(a);

                   //  }

                   if (resultXml.selectSingleNode("//q1:address1_line1") != null)

                       crmForm.all.new_shipaddress1.DataValue = resultXml.selectSingleNode("//q1:address1_line1").nodeTypedValue;

                   if (resultXml.selectSingleNode("//q1:address1_line2") != null)

                       crmForm.all.new_shipaddress2.DataValue = resultXml.selectSingleNode("//q1:address1_line2").nodeTypedValue;

                   if (resultXml.selectSingleNode("//q1:address1_city") != null)

                       crmForm.all.new_shipcity.DataValue = resultXml.selectSingleNode("//q1:address1_city").nodeTypedValue;

                   if (resultXml.selectSingleNode("//q1:address1_stateorprovince") != null)

                       crmForm.all.new_shiptostate.DataValue = resultXml.selectSingleNode("//q1:address1_stateorprovince").nodeTypedValue;

                   if (resultXml.selectSingleNode("//q1:address1_postalcode") != null)

                       crmForm.all.new_shipzip.DataValue = resultXml.selectSingleNode("//q1:address1_postalcode").nodeTypedValue;

                   if (resultXml.selectSingleNode("//q1:emailaddress1") != null)

                       crmForm.all.new_email.DataValue = resultXml.selectSingleNode("//q1:emailaddress1").nodeTypedValue;

                   if (resultXml.selectSingleNode("//q1:address1_country") != null)

                       crmForm.all.new_shiptocountry.DataValue = resultXml.selectSingleNode("//q1:address1_country").nodeTypedValue;

                   if (resultXml.selectSingleNode("//q1:telephone1") != null)

                       crmForm.all.new_phone.DataValue = resultXml.selectSingleNode("//q1:telephone1").nodeTypedValue;

               }

           }

           else {

               // Blank fields before editing new values

               Xrm.Page.getAttribute("new_shipaddress1").setValue("");

               Xrm.Page.getAttribute("new_shipaddress2").setValue("");

               Xrm.Page.getAttribute("new_shipcity").setValue("");

               Xrm.Page.getAttribute("new_shiptostate").setValue("");

               Xrm.Page.getAttribute("new_shipzip").setValue("");

               Xrm.Page.getAttribute("new_shiptocountry").setValue("");

               Xrm.Page.getAttribute("new_phone").setValue("");

               Xrm.Page.getAttribute("new_email").setValue("");

           }

       }

       catch (err) {

       }

    }

    function copycontact() {

       //check if box is checked

       var myAttribute = "new_shiptosame";

       var myControl = Xrm.Page.ui.controls.get(myAttribute);

       var myCheckboxValue = myControl.getAttribute().getValue();

       // returns True or false

       if (myCheckboxValue == true) {

           //Get a lookup value

           var lookupItem = new Array();

           lookupItem = Xrm.Page.getAttribute("new_contact").getValue();

           if (lookupItem != null) {

               //Get the current values

               var name = lookupItem[0].name;

               var guid = lookupItem[0].id;

               var entType = lookupItem[0].entityType;

               //Set a lookup value

               var value = new Array();

               value[0] = new Object();

               value[0].id = guid;

               value[0].name = name;

               value[0].entityType = entType;

               //Set the Field Value

               Xrm.Page.getAttribute("new_shiptocontact").setValue(value);

           }

           copyaddress()

       }

    }

    function displayrequired() {

       var lookupObject = Xrm.Page.getAttribute("new_product");

       if (lookupObject != null) {

           var lookUpObjectValue = lookupObject.getValue();

       }

       if (lookUpObjectValue != null) {

           var lookuptextvalue = lookUpObjectValue[0].name;

       }

       if (lookuptextvalue == "J3500") {

           Xrm.Page.getAttribute("new_evaldisplaytype").setRequiredLevel("required");

       }

       else if (lookuptextvalue != "J3500") {

           Xrm.Page.getAttribute("new_evaldisplaytype").setRequiredLevel("none");

       }

    }

    function activate_CopyPrimaryContact() {

       Xrm.Page.getControl("new_shiptosame").onclick = function () {

           Xrm.Page.getAttribute("new_shiptosame").fireOnChange();

       }

    //    crmForm.all.new_shiptosame.onclick = function () {

    //        crmForm.all.new_shiptosame.FireOnChange();

    //    };

    }

    Can you confirm about for new web service path?

    Thanks,

  • Kristian Cole Profile Picture
    290 on at

    Whats the error thrown? or result, if any?

  • Community Member Profile Picture
    on at

    We are getting following messages in feature check xml.

    <VerificationResult>

           <Severity>Error</Severity>

           <Component>WebResource</Component>

           <ComponentId>b803bdb9-0899-e111-8211-005056b9001c</ComponentId>

           <Message>Web resource new_evalrequestscript contains a reference to the 2007 web service endpoint</Message>

         </VerificationResult>

    <VerificationResult>

           <Severity>Error</Severity>

           <Component>WebResource</Component>

           <ComponentId>a4c2514a-04e1-e111-bb3f-0050569f003a</ComponentId>

           <Message>Web resource new_set_rowid contains a reference to the 2007 web service endpoint</Message>

         </VerificationResult>

    Thanks,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans