Anniversary Web part SharePoint JavaScript
Create a Refinable Property like Refinabledate according to the requirement. Go to site settings > Search schema. In the managed properties, search for refinabledate00(if this is already mapped select an empty one) and map it to the SPS-Anniversary crawled property(by default sharepoint crawls the AD user profile properties with a prefix of SPS-). Run a full crawl for the refinabledate to get all the info generated. To test if refinable property has values run a search query https:// yoursitecollurlhere /_api/search/query?querytext=%27*%27&sourceid=%27B09A7990-05EA-4AF9-81EF-EDFAB16C4E31%27&selectproperties=%27Title,Refinabledate01,Path%27&sortlist=%27Refinabledate01:ascending%27&rowlimit=500 Once you get a set of results as below, you can paste the url into the below code Once you get results for the query, iterate through results with condition according to which dates you want to show the birthdays for. For this you need to get the current date which is in...
Comments
Post a Comment