Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

FetchXML condition not working ?

$
0
0

Hi everyone !

I' m using the following fetchxml :

var siteIdText = Xrm.Page.getAttribute("siteid").getValue()[0].id;

	var fetchXml =
		"<fetch version='1.0' aggregate='true' >" +"<entity name='serviceappointment' >" +"<filter type='and' >" +"<condition attribute='scheduledstart' operator='eq' value= 'next-month' />" +"<condition attribute='siteid' operator='eq' value='" + siteIdText + "' />" +"</filter>" +"<attribute name='activityid' alias='count' aggregate='count' />" +"</entity>" +"</fetch>";

	/*"<fetch mapping='logical' aggregate='true'>" +"<entity name='account'>" +"<attribute name='accountid' aggregate='count' alias='count' />" +"</fetch>";*/

	var result = XrmServiceToolkit.Soap.Fetch(fetchXml, false);


I want to get the Service Activities of a specific Site scheduled for next month . Now the condition for next month works but when i added the other condition  

"<condition attribute='siteid' operator='eq' value='" + siteIdText + "' />" + 

it popup an error.

Any ideas if my syntax is wrong?

Viewing all articles
Browse latest Browse all 82002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>