Birthday Javascript Sharepoint 2013
Below is the code to pull birthdays using REST API search Sharepoint 2013. Create a Refinable Property like RefinableString or Refinabledate according to the requirement. In my case I had to try both and had an issue with Refinabledate since the month was getting appended to the year. Lets say someone has mar 23rd as birthday in User profile property, the date was showing as 01-03-2023. Hence I had to assign it to a string. Since in our environment it was a dd-mmm(no year) format which was a custom profile property, It was showing 23rd-March in my case. Once RefinableString02 was assigned it was showing the same dd-mmm format. For getting the right url you need to have the querytext as * and source id to the people, and select the properties required which is "Title,RefinableString02,Path". Then fire an ajax query as below with the rest url as below:https://yoursitecollurl/_api/search/query?querytext=%27Refinabledate00%3E%222-7-2000%22%27&sourceid=%27B09A7990-05E...
Comments
Post a Comment