Thursday 24 February 2011

fetchxml conditions, what are they, how do they work

fetchxml conditions, what are they?

Conditions in fetchxml as very straight forward, a full list of them are below.

Example usage for a simple firstname equals robert

<filter type='and'>
      <condition attribute='firstname' operator='eq' value='robert'/>

</filter>

Example usage for a simple firstname equals robert or simon

<filter type='or'>
      <condition attribute='firstname' operator='eq' value='robert'/>

      <condition attribute='firstname' operator='eq' value='simon'/>

</filter>


Example usage firstname is a match to one of the values in a multivalue paramater called @FN (firstname)

<filter type='and'>
      <condition attribute='firstname' operator='in' value='@FN'/>

</filter>


Shows any records where the createdon date equals today or within the last 7 days, note: this only looks at the date, so if your looking at a datetime field then no matter what the time is it will show you todays records.

<filter type='or'>
      <condition attribute = 'createdon' operator='today'/>

      <condition attribute = 'createdon' operator='last-seven-days'/>

</filter>


ConditionActual comparisonValue
equals xeqx
does not equal xnex
is greater than xgtx
is greater than or equal to xgex
is less than xltx
is less than or equal to xlex
begins with xlike x%
does not begin with xnot-like x%
ends with xlike %x
does not end with xnot-like %x
contains xlike %x%
does not contain xnot-like %x%
existsnot-null
does not existnull
anytimenot-null
yesterdayyesterday
todaytoday
tomorrowtomorrow
in next 7 daysnext-seven-days
in last 7 dayslast-seven-days
next weeknext-week
last weeklast-week
this weekthis-week
this monththis-month
last monthlast-month
next monthnext-month
this yearthis-year
next yearnext-year
last yearlast-year
on x onx
on or after xon-or-afterx
on or before xon-or-beforex
in betweenbetween
not betweennot-between
inin
not innot-in
equals user ideq-userid
does not equal user idne-userid
equals business ideq-businessid
does not equal business idne-businessid

ADFS Timeout on Server 2012 for CRM 2011

This follows on from this Microsoft Guide http://social.technet.microsoft.com/wiki/contents/articles/7681.setting-the-adfs-timeout-for-crm...