Why i am unable to use SystemUpdate() inside my CSOM code

Valued Contributor

I have the following CSOM code inside a console application:-

ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
ListItem listItem2 = riskValue.AddItem(itemCreateInfo);
listItem2["Title"] = s;
listItem2.SystemUpdate();

 

but i am not sure why i can not access the SystemUpdate method, where i am getting this error:-

 

 

 

Severity Code Description Project File Line Suppression State

Error   CS1061  'ListItem' does not contain a definition for 'SystemUpdate' and no accessible extension method 'SystemUpdate' accepting a first argument of type 'ListItem' could be found (are you missing a using directive or an assembly reference?)

 

 

 

3 Replies

Hi @john john 

which version of csom / sp are you using?

 

cheers 

Federico

@Federico Porceddui am working on sharepoint online ..

Great! @john john can you confirm you are using this package? https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM/

 

Cheers,

Federico