How to pass the Null Value in Javascript in Dynamics CRM 4.0?
I need to fetch the parent Subjects using Javascript. How can I get all the 1st level parent subjects? Logic should be like when parentsubject is 'null'. for that I wrote the following query.
var message =
[
"<?xml version='1.0' encoding='utf-8'?>",
"<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">",
GenerateAuthenticationHeader(),
"<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>subject</q1:EntityName>",
"<q1:Column开发者_开发百科Set xsi:type=\"q1:ColumnSet\" >",
"<q1:Attributes>",
"<q1:Attribute>subjectid</q1:Attribute>",
"</q1:Attributes>",
"</q1:ColumnSet>",
"<q1:Criteria>",
"<q1:FilterOperator >And</q1:FilterOperator>",
"<q1:Conditions>",
"<q1:Condition>",
"<q1:AttributeName >parentsubject</q1:AttributeName>",
"<q1:FilterOperator>Equal</q1:FilterOperator>",
"<q1:Values>",
"<q1:Value xsi:type='xsd:string'>" _____________ "</q1:Value>",
"</q1:Values>",
"</q1:Condition>",
"</q1:Conditions>",
"</q1:Criteria>",
"</query>",
"</RetrieveMultiple>",
"</soap:Body>",
"</soap:Envelope>"
].join("");
Please let me know what should I pass in _______
Thanks in advance JK
FilterOperator should be Operator, Equal should be Null, and remove the Values node. So:
"<q1:Condition>",
"<q1:AttributeName >parentsubject</q1:AttributeName>",
"<q1:FilterOperator>Equal</q1:FilterOperator>",
"<q1:Values>",
"<q1:Value xsi:type='xsd:string'>" _____________ "</q1:Value>",
"</q1:Values>",
"</q1:Condition>",
should be
"<q1:Condition>",
"<q1:AttributeName >parentsubject</q1:AttributeName>",
"<q1:Operator>Null</q1:Operator>",
"</q1:Condition>",
加载中,请稍侯......
精彩评论