Thursday, July 17, 2014

SharePoint Organization Chart with Presence

Here's a little script that - depending on your setup - will enable you to get presence icons on your Org Chart looking like this:

The Org Chart links to the users SharePoint profile page with a url like the below:
http://company.com/Person.aspx?accountname=DOMAIN\Username

In our company we all have an email address that looks like this:
username@company.com (for internal use only)

Our usernames has a fixed length, so using the scripts substr function I grap the username from the end of the url and adds the company email trail to it. It's no magic and the script is small.

You can find the script here. You'll need to modify these two variables:
   // Please modify these two variables to fit your company settings
   var companyEmail = "@yourcompany.com";
   var lenghtOfUsername = 8;

You will then need to add the script to the HTML Source portion of a Content Editor web part. Please refer to sections 11 to 16 on this blog post to see how you do that. Also note that the script refers to jQuery and SPService using external CDN's and it is highly recommended that you download these scripts and refer to them locally.

Tuesday, May 20, 2014

Who created this list or library?


How do you find out who created a particular list or library in SharePoint? It doesn’t say anywhere! Only option is to use PowerShell and that requires that you have access to the SharePoint server.

So I baked together a little script that will give you the answer.

You can find the script here. You will need to add the script to the HTML Source portion of a Content Editor web part. Please refer to sections 11 to 16 on this blog post to see how you do that. Also note that the script refers to jQuery and SPService using external CDN's and it is highly recommended that you download these scripts and refer to them locally.

Once the script has been successfully added to your page it should look similar to this



Here’s how you use it:
  1. First you need to copy the url or address of the list or library. If you have the list open you can get it from the addressbar by pressing the F6 key followed by Ctrl + C. If you are looking at the All Site Content overview, you can simply right – click it and select Copy Shortcut.
  2. Next go back to your WhoCreatedThisList page.
  3. Paste the url into the textbox by pressing Ctrl+V and then click the Search button
  4. Allow the script to work for a few seconds
  5. A dialog box will appear with the owner information
  6. If you need to save the information you can copy it to the clipboard by pressing Ctrl+C while the dialog box is in focus.