2015-11-03 77 views
0

,成員列表下有一堆計數器。不幸的是這些字段是隻讀的。在SharePoint 2013社區站點中,社區站點中的SharePoint'我的成員資格'webpart計數器

當我們以編程方式導入討論(通過託管API CSOM)時,計數器會更新。在導入之前,我們清除討論列表,然後每個成員的計數器不會減少。 當手動刪除項目,它們被還原:(

任何人都可以指出如何能夠通過CSOM更新會員的WebPart統計(或SSOM如果需要的話)。

提前感謝!

回答

0

使用SSOM:

 _web.Properties["Community_TopicsCount"] = 100; 
     _web.AllProperties["Community_TopicsCount"] = 100; 

     _web.Properties["Community_RepliesCount"] = 100; 
     _web.AllProperties["Community_RepliesCount"] = 100; 

     _web.Properties["Community_MembersCount"] = _web.SiteUsers.Count.ToString(); 
     _web.AllProperties["Community_MembersCount"] = _web.SiteUsers.Count.ToString(); 

     _web.Properties.Update(); 
     _web.Update(); 
相關問題