【问题标题】:SharePoint 'my membership' webpart counters in community site社区网站中的 SharePoint“我的会员资格”Webpart 计数器
【发布时间】:2016-02-03 11:49:34
【问题描述】:

在 SharePoint 2013 社区网站中,成员列表下有一堆计数器。不幸的是,这些字段是只读的。

当我们以编程方式导入讨论(通过托管 API CSOM)时,计数器会更新。在导入之前,我们清除讨论列表,然后每个成员的计数器不会减少。 手动删除项目时,它们会减少:(

任何人都可以指出如何能够通过 CSOM(或 SSOM,如果需要)更新成员资格 webpart 统计信息。

提前致谢!

【问题讨论】:

    标签: sharepoint sharepoint-2013 csom


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-10
      • 2020-01-21
      • 2010-12-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多