简体   繁体   English

社区站点中的SharePoint“我的会员” Webpart计数器

[英]SharePoint 'my membership' webpart counters in community site

in a SharePoint 2013 community site, there are a bunch of counters under the members list. 在SharePoint 2013社区网站中,成员列表下有一堆计数器。 Unfortunately these fields are readonly. 不幸的是,这些字段是只读的。

When we programmatically import discussions (via managed API CSOM), the counters are updated. 当我们以编程方式导入讨论(通过托管API CSOM)时,计数器将更新。 Before importing, we clear the list of discussions and then the counters for each member are not reduced. 在导入之前,我们先清除讨论列表,然后再减少每个成员的计数器。 When manually deleting items, they are reduced :( 手动删除项目时,它们会减少:(

Can anyone point out how to be able to update the membership webpart statistics via CSOM (or SSOM if needed). 谁能指出如何通过CSOM(或SSOM(如果需要))更新成员资格Webpart统计信息。

Thanks in advance! 提前致谢!

using SSOM: 使用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();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM