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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

CRM 2011 SOAP Request

(0) ShareShare
ReportReport
Posted on by 65

Dears 

I have one JS File with SOAP Request.

I want to update the conditions by adding another condition related to optionset field(dropdownlist),

the condition is : new_paymenttype=1

I updated the condition by adding this part but it is not working !!, I am looking for your support 

" <q1:Condition>" +
" <q1:AttributeName>new_paymenttype</q1:AttributeName>" +
" <q1:Operator>Equal</q1:Operator>" +
" <q1:Values>" +
" <q1:Value xsi:type=\"xsd:string\">"+condition+"</q1:Value>" +
" </q1:Values>" +
" </q1:Condition>" +

var Accountxml = "" + "<?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>" +
" <RetrieveMultiple xmlns=\""">schemas.microsoft.com/.../WebServices\">" +
" <query xmlns:q1='schemas.microsoft.com/.../Query' xsi:type='q1:QueryExpression\'>" +
" <q1:EntityName>new_leasepayments</q1:EntityName>" +

" <q1:ColumnSet xsi:type=\"q1:ColumnSet\">" +
" <q1:Attributes>" +
" <q1:Attribute>new_dueamount</q1:Attribute>" +
" <q1:Attribute>new_serialnumber</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>new_new_leaseagreementinformationid</q1:AttributeName>" +
" <q1:Operator>Equal</q1:Operator>" +
" <q1:Values>" +
" <q1:Value xsi:type=\"xsd:string\">" + contactname + "</q1:Value>" +
" </q1:Values>" +
" </q1:Condition>" +

" <q1:Condition>" +
" <q1:AttributeName>statuscode</q1:AttributeName>" +
" <q1:Operator>Equal</q1:Operator>" +
" <q1:Values>" +
" <q1:Value xsi:type=\"xsd:string\">1</q1:Value>" +
" </q1:Values>" +
" </q1:Condition>" +


" </q1:Conditions>" +
" </q1:Criteria>" +
" </query>" +
" </RetrieveMultiple>" +
" </soap:Body>" +
"</soap:Envelope>" +
"";
// Create an instance of an XMLHTTP object.
var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
xmlHttpRequest.Open(
"POST",
"/mscrmservices/2007/CrmService.asmx",
false
);

xmlHttpRequest.setRequestHeader(
"SOAPAction",
"">schemas.microsoft.com/.../RetrieveMultiple"
);

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

xmlHttpRequest.setRequestHeader(
"Content-Length", Accountxml.length
);

// Send the XMLHttp request.
xmlHttpRequest.send(Accountxml);

I have the same question (0)

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 109 Super User 2025 Season 2

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 97

#3
#ManoVerse Profile Picture

#ManoVerse 56

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans