Richard Butterwood
Richard Butterwood

Reputation: 745

Dynamics CRM FetchXML - Birthday is today

Is it possible using FetchXML to find out the Contacts who's birthday is for today? For example 4/1/2000, 4/1/2001, 4/1/2002?

I don't want to write custom code to do this if possible

Thanks in advance

Upvotes: 0

Views: 1032

Answers (2)

BlueSam
BlueSam

Reputation: 1888

Have you tried

<condition attribute="birthdate" operator="today"/>

EDIT: One way to accomplish this would be to create a recurring workflow job that runs a custom activity daily that sets an attribute to true for all the people whose birthday is today.

Another option might be to create a retrieve multiple plugin that changes the query criteria dynamically, but you might need to also include additional attribute(s) to just keep track of the month and day separately from the year.

Upvotes: 0

Andrew Butenko
Andrew Butenko

Reputation: 5446

Unfortunately that's not possible without additional coding... General approach is to add 2 fields - day of birth and month of birth, populate it during creation/update of a record and use mentioned fields after.

Upvotes: 2

Related Questions