【问题标题】:Remote event receiver setting LastModifiedBy to "SharePoint Program"远程事件接收器将 LastModifiedBy 设置为“SharePoint 程序”
【发布时间】:2014-04-02 20:31:38
【问题描述】:

我有一个远程事件接收器,在列表中,每次更新项目时都会触发它,它工作正常。

但是,项目上的“上次修改者”字段设置为“SharePoint 程序”。我尝试将字段设置为特定值,但似乎没有什么好处,它仍然以“SharePoint Program”结束(我猜Update()会自动再次设置上次修改的)

private static void RemoveMemberGroupFromItem(ListItem item, Group memberGroup, User modifyingUser)
    {
        var userToken = modifyingUser.LoginName;

        // Some changes on the item

        item.FieldValues[ModifiedByField] = userToken;
        item.Update();
    }

我也尝试将 properties.ItemEventProperties.AfterProperties 设置为特定值; (vti_modifiedby)但它也没有帮助。

【问题讨论】:

    标签: sharepoint csom


    【解决方案1】:

    如果您改用item.SystemUpdate()http://msdn.microsoft.com/en-us/library/ms461526.aspx

    【讨论】:

    • 这在 CSOM 中不可用
    猜你喜欢
    • 2013-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-02-17
    • 2010-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多