programmatically add a My Link.

This is how you add a My Link (aka QuickLink) in code.

Add a Reference to Microsoft.Office.Server


Dim context As ServerContext = ServerContext.Current
Dim profilmanager As UserProfileManager = New UserProfileManager(context)
Dim profile As UserProfile = profilmanager.GetUserProfile(SPContext.Current.Web.CurrentUser.LoginName)
Dim qlmanager As QuickLinkManager = New QuickLinkManager(profile)
Dim ql As QuickLink = qlmanager.Create(pTitle, pUrl, pQuickLinkGroupType, pGroup, pPrivacy)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: