Sharepoint 项目更新列表项目比较

Sharepoint 项目更新列表项目比较,sharepoint,sharepoint-clientobject,event-receiver,Sharepoint,Sharepoint Clientobject,Event Receiver,是否可以将属性listItemId与新列表中的字段进行比较?我有一个事件接收器,我想在项目更新后更新一个新列表。我不想使用GetItemById,我想将自动生成的第一个列表ID与新列表中的字段进行比较 foreach(destListItems中的ListItem更新项){ if(properties.ListItem[“ID”]==UpdateItem[“NewId”]){ //做点什么 } }试试这个: if (properties.ListItem["ID"].ToString() ==

是否可以将属性listItemId与新列表中的字段进行比较?我有一个事件接收器,我想在项目更新后更新一个新列表。我不想使用GetItemById,我想将自动生成的第一个列表ID与新列表中的字段进行比较

foreach(destListItems中的ListItem更新项){
if(properties.ListItem[“ID”]==UpdateItem[“NewId”]){
//做点什么
}
}
试试这个:

if (properties.ListItem["ID"].ToString() == UpdateItem["NewId"].ToString()); {
    UpdateItem["Field"]="123";
    UpdateItem.Update();
}