2015-11-03 75 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(); 
相关问题