Domanda

Sto cercando di ottenere solo un tipo specifico di evento da un feed di attività degli utenti.Ho cercato MSDN e Google ma non riesco a trovare alcun tipo di mappatura come

  ActivityTypeID     Event
  ---------------    ----------------
   1                 Tags And Notes
   2                 Added colleague
.

È stato utile?

Soluzione

Took while but I found it in PowerShell

$siteUrl = "https://mysite.contesso.com"
$s = get-spsite $siteUrl
$ctxt = get-spservicecontext $s
$profile = [Microsoft.Office.Server.UserProfiles.Profileloader]::GetProfileLoader($ctxt).GetUserProfile()

#or
#$profile = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ctxt).GetUserProfile("accountName")

$mgr = new-object Microsoft.Office.Server.Activityfeed.activityManager($profile,$ctxt)
$mgr.ActivityTypes | Select ActivityTypeName, ActivityTypeId

Use the above code in your SharePoint Powershell console window and it will display a list of values.

Here's the output on my system:

ActivityTypeName                                                 ActivityTypeId
----------------                                                 --------------
StatusMessage                                                                17
DLMembershipChange                                                           10
SharingInterest                                                              11
SocialTaggingByColleague                                                     12
NoteboardPosts                                                               13
SocialTaggingByAnyone                                                        14
SocialRatings                                                                15
INTERNAL_ChangeMarker                                                        16
ColleagueAddition                                                             6
TitleChange                                                                   7
ManagerChange                                                                 8
BlogUpdate                                                                    9
ProfilePropertyChange                                                         1
Birthday_Reminder                                                             2
Birthday_Today                                                                3
WorkplaceAnniversary_Reminder                                                 4
WorkplaceAnniversary_Today                                                    5
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top