/ #apps 

Mavention Birthdays available in the Office Store

Mavention Birthdays available in the Office Store header image

Building SharePoint 2013 tends to be a bit addicting once you have the hang of it. Ever since we released a number of apps with Mavention. I got the change to discuss some cool app ideas with Waldek Mastykarz and as a result we figured that for having an intranet one of the things that you would like to be aware of is the upcoming birthdays. Helping your intranet users to see who is having their birthday soon, will enable them to reach out, making your intranet a little bit more social. So Waldek and I challenged each other to build a plain and simple app with a clean interface with the upcoming birthdays.

Since this information is already stored in the profile you can use the SharePoint 2013 Search to determine the next upcoming birthdays. The basics are pretty easy, using a simple REST call you can retrieve search results by the query you would want, so by using the current date time we could determine next upcoming birthdays. Since the profile data is stored in a format with a fixed year (2000) you will have to write some logic to determine if we should fire a second query. If you query in November and there are no birthdates till January we also want to make sure to retrieve those instead of just stating that there are no upcoming birthdays. Then with the data present it is all about rendering the required information and you are done. The biggest pitfall we encountered was making sure it all worked in IE8 due to some limitations to the Date object, but with the help of Moment.js we also were able to overcome those issues. Even though IE8 support will be dropped on 8 April 2014 as you can see in the Admin Center (requires login), part of the submission process till that time is making sure it either works or fails gracefully, so making it work seamed like the best option.

In order to leverage the SharePoint 2013 Search you will have to do some manual configuration, so when you install the Mavention Birthdays you are asked to complete these steps before you will be able to see results. The steps differ between slightly between Office 365 and on premise:

If you installed Mavention Birthdays on-premise you need to complete the following configuration steps:

  • Go to your Search Service Service Application and click Manage Search Schema
    • Click the New Managed Property link
    • Name the new property Birthday, and make sure to make it of Date and Time type
    • Check the boxes for Queryable, Searchable, Retrievable and Sortable (active)
    • Then click the Add a Mapping button, search for SPS-Birthday and select the People:SPS-Birthday property
    • Click on the OK button to commit the changes
    • Make sure you have a few profiles with birthday data, and that the Everyone option is selected for Birthday property

If you installed Mavention Birthdays in Office 365 you need to complete the following configuration steps:

  • Go to your Search Service Service Application and click Manage Search Schema
    • Search for RefinableDate00 and from the context menu select Edit/Map property
    • Add an Alias called Birthday
    • Then click the Add a Mapping button, search for SPS-Birthday and select the People:SPS-Birthday property
    • Click on the OK button to commit the changes
    • Make sure you have a few profiles with birthday data, and that the Everyone option is selected for Birthday property

After you have completed the steps listed above you will need to do a full crawl for the changes to take effect. If you installed this Mavention Birthdays in Office 365 you will either have to create a ticket to request a full crawl, or wait up to a week.

You can find the Mavention Birthdays in the Office Store or checkout all Apps by Mavention.

Tip: Use the Mavention Profile Completeness to encourage users to keep their profile up-to-date.

Loading comments…