2. About Me
• Michael Doyle
• Senior Architect at Waggener Edstrom
• doyle@techelixir.com
• @SharePointNinja
• www.sharepointninja.com
• Author of “Customizing My Site in SharePoint
2010”
3. What’s New
• Community Site functionality with
rankings, ratings, comments and replies
• My Sites are similar but have a new look and
feel
• Skydrive
• New ways to mention, follow, and tag
22. SkyDrive vs. SkyDrive Pro
• SkyDrive
– Free to individuals
– For Personal Files
– Cloud Storage
– Available in Office 365 Home Premium
– SharePoint Online users get 7 gig for personal
storage
23. SkyDrive vs. SkyDrive Pro - 2
• SkyDrive Pro
– Part of SharePoint 2013
– Storage limits determined by SharePoint
Administrator
– Synchs directly to Office Applications
– Get benefits of coauthoring, versioning and
workflows
24. Goodbye SharePoint Workspace
• Not being shipped
with Office 2013
• Being replaced with
SkyDrive Pro
• Will still work with
SharePoint 2013
sites
31. User Profile Service
• Still uses FIM Services
• Same requirements for AD
permissions
• Pretty much the same as 2010
32. Profile Replication
• Recommendation is that you keep the user
profiles in the region they are physically
located
• Consuming user profile service will result in
sluggish performance
• Use the Profile Replication Service (just like in
SP 2010) to replicate user profile data (About
Me, Pictures, etc.)
42. Client Side Scripting with People fields
• Scenario
– We want to use client side scripting and we want to
display the photo of the person in the people field.
• Solution
– Include sp.js
– Query the list to get the user id
– Query the user information list to get the url of the
photo
43. Include the Script Link
• Edit aspx page in Advanced Mode
• Put in script link
– <SharePoint:scriptlink ID="ScriptLink"
runat="server" Name="sp.js" Localizable="false"
LoadAfterUI="true"/>
Note: can also be made part of the master page.
44. Query the list
var context = new SP.ClientContext.get_current();
var web = context.get_web();
var list = web.get_lists().getByTitle(‘Birthdays');
var query = new SP.CamlQuery();
var camlString = '<View><Query><Where><Geq><FieldRef Name="SortDate" /><Value
Type="DateTime"><Today /></Value></Geq></Where><OrderBy><FieldRef Name="SortDate"
Ascending="True" Type="DateTime"/></OrderBy></Query></View>;
query.set_viewXml(camlString);
allItems = list.getItems(query);
context.load(allItems, 'Include(Title, Person, SortDate)');
context.executeQueryAsync(Function.createDelegate(this, this.BirthdaySuccess),
Function.createDelegate(this, this.BirthdayFailed));
45. Query the Person Field
//This gets the person field
user = currentItem.get_item('Person');
//This gets the user’s name from Person Field
obj.innerText = user.get_lookupValue();
//Send the User ID
getUserProfile(user.get_lookupId());
Note: the lookup id of this field is tied to the User Information List for the site
collection it is running in.
46. Query the User Information List
var userInfoList = web.get_siteUserInfoList();
var camlQuery = new SP.CamlQuery();
//Set CAML query to limit it to the one user
camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name="ID"/>'
+'<Value Type="Number">' + userId +
'</Value></Eq></Where></Query><RowLimit>1</RowLimit></View>');
collListItem = userInfoList.getItems(camlQuery);
context.load(collListItem);
context.executeQueryAsync(Function.createDelegate(this, this.onUserQuerySucceede
d),Function.createDelegate(this, this.onUserQueryFailed));
47. Display Picture
var item = collListItem.itemAt(0);
var obj = document.getElementById("cel-pic-1");
var test = item.get_item('Picture');
if(test == null) //person doesn’t have a picture
{
obj.innerHTML = "<img height=64px width=64px class='cel-img' src='_layouts/images/person.gif'
/>";
}
else //use the url of the picture field
{
var pictureUrl = item.get_item('Picture').get_url();
obj.innerHTML = "<img height=64px width=64px class='cel-img' src='" + pictureUrl + "' />";
}
}