locked
MSCRM 2013 getAuthenticationHeader RRS feed

  • Question

  • Dear all;

    i new mscrm 2013 they said that there is no Xrm.Page.context.getAuthenticationHeader avaiable for soap call then anyone knows what is the replacement of it??

    Wednesday, September 11, 2013 10:35 AM

All replies

  • This is deprecated in CRM 2011:

    Deprecated. The global getAuthenticationHeader is still available for backwards compatibility for Microsoft Dynamics CRM 4.0 scripts that are upgraded. Scripts using the SOAP endpoint for web resources or the REST endpoint for web resources do not require this function for authentication.

    http://msdn.microsoft.com/en-us/library/gg334511.aspx#BKMK_getAuthenticationHeader


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Wednesday, September 11, 2013 1:11 PM
    Moderator
  • Hi jason;

    that's how we are going to write soap request then 

     var xml = "<?xml version='1.0' encoding='utf-8'?>" +
            "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/>" +
          
            "<soap:Body>" +
            "<RetrieveMultiple xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\">" +
            "<query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\">" +
            "<q1:EntityName>account</q1:EntityName>" +
                "<q1:ColumnSet xsi:type='q1:ColumnSet'>" +
                    "<q1:Attributes>" +
                        "<q1:Attribute>name</q1:Attribute>" +
                    "</q1:Attributes>" +
                "</q1:ColumnSet>" +
            "<q1:Distinct>false</q1:Distinct>" +
            "<q1:PageInfo>" +
            "   <q1:PageNumber>1</q1:PageNumber>" +
            "   <q1:Count>1</q1:Count>" +
            "</q1:PageInfo>" +

            "<q1:Criteria>" +
            "<q1:FilterOperator>And</q1:FilterOperator>" +

            "<q1:Conditions>" +
                             "<q1:Condition>" +
                             "<q1:AttributeName>accountid</q1:AttributeName>" +
            "<q1:Operator>Equal</q1:Operator>" +
            "<q1:Values>" +
            "<q1:Value xmlns:q2='http://microsoft.com/wsdl/types/' xsi:type='q2:guid'>" +
            accountid[0].id +
            "</q1:Value></q1:Values></q1:Condition>" +

            "</q1:Conditions>" +
            "</q1:Criteria>" +

            "</query></RetrieveMultiple>" +
            "</soap:Body></soap:Envelope>";

    Wednesday, September 11, 2013 1:34 PM
  • Hi Anwar,

    You can write the Soap JavaScript as given in the below blog.

    http://vikramxrm.blogspot.in/2012/03/retrieve-multiple-records-using.html

    You can also write query using Json.

    http://lakshmanindian.wordpress.com/2012/05/31/retrieve-multiple-using-odata-in-crm-2011/

    Thanks!

    Wednesday, September 11, 2013 6:48 PM
  • Hi 

    crm 2013 is not supporting the 

    selectSingleNode
    Friday, September 13, 2013 1:34 PM
  • Hi Anwar,

    Are you testing this on Internet explorer 10.0 version?

    You can also go with Odata.

    http://lakshmanindian.wordpress.com/2012/05/31/retrieve-multiple-using-odata-in-crm-2011/

    Hope this helps!

    If this post helps you, please click "Mark As Answer" on the post and "Vote as Helpful"

    Saturday, September 14, 2013 7:39 AM