Pages Menu

Posted by on May 11, 2015 in Learn Skype Web SDK | 0 comments

Learn Skype Web SDK Day 8 : Setting Your Own Information

Learn Skype Web SDK Day 8 : Setting Your Own Information

This is one post in a series of more than 30, devoted to helping you get up to speed quickly with the new Skype Web SDK. Each lesson comes with source code (in GitHub) and a working demo page so you can see what it does. Check out the full list of posts on the Skype Web SDK page.

View Demo

As you know, it’s not just the presence information you can change in Lync. Some of the properties in the mePerson object can be set as well as read. These include the Location field and Note field – sometimes also called the Message of the Day – which is displayed at the top of the Lync client.

You can set these properties by passing the new value into them:

[code language=”javascript”]

var me = client.personsAndGroupsManager.mePerson;
me.location(“new location”);
me.note.text(“new note”);


Note how the format for setting the note is slightly different. This is because it’s also used to store Out of Office notes. See the post of Getting Info for more information.

In this example, once logged in, the Note and Location information is displayed in text boxes, which can also be modified to update Lync. The maximum length of a Personal Note is 500 characters.

If you’re using the Lync client to see these changes, it’s best to log in as another user and then view the contact card of the user you are changing. If you sign in as the same user, you won’t see the Location field updated. This is because location (like presence) is aggregated. You might be signed into Lync in several places so Lync won’t automatically reset your location everywhere just because you set it in one place.

[code language=”javascript”]


Demo Online

You can try this code out against your own Skype for Business environment by going to the demo page. From here you can also download the code from GitHub if you want to host it locally, or take it and use it in your next project.

Disclaimer: This is sample code, intended to inform and educate. It is not production-ready and is lacking key components such as error handling. You use it entirely at your own risk. You should fully understand the effects, limitations and risks of the code before executing, and understand the implications of any set-up steps. By using these code examples you are using the Skype Web SDK, so you should read the Skype Software License Terms to which you are agreeing.

Good to Know

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses cookies to help make this website better. By continuing to use this site we’ll assume you’re OK with that (implied consent).