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

%3CLINGO-SUB%20id%3D%22lingo-sub-1619594%22%20slang%3D%22en-US%22%3EWhy%20i%20am%20unable%20to%20use%20SystemUpdate()%20inside%20my%20CSOM%20code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1619594%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20the%20following%20CSOM%20code%20inside%20a%20console%20application%3A-%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EListItemCreationInformation%20itemCreateInfo%20%3D%20new%20ListItemCreationInformation()%3B%0AListItem%20listItem2%20%3D%20riskValue.AddItem(itemCreateInfo)%3B%0AlistItem2%5B%22Title%22%5D%20%3D%20s%3B%0AlistItem2.SystemUpdate()%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20i%20am%20not%20sure%20why%20i%20can%20not%20access%20the%20SystemUpdate%20method%2C%20where%20i%20am%20getting%20this%20error%3A-%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ESeverity%20Code%20Description%20Project%20File%20Line%20Suppression%20State%0A%0AError%20%20%20CS1061%20%20'ListItem'%20does%20not%20contain%20a%20definition%20for%20'SystemUpdate'%20and%20no%20accessible%20extension%20method%20'SystemUpdate'%20accepting%20a%20first%20argument%20of%20type%20'ListItem'%20could%20be%20found%20(are%20you%20missing%20a%20using%20directive%20or%20an%20assembly%20reference%3F)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1619594%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1638684%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20i%20am%20unable%20to%20use%20SystemUpdate()%20inside%20my%20CSOM%20code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1638684%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233354%22%20target%3D%22_blank%22%3E%40john%20john%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewhich%20version%20of%20csom%20%2F%20sp%20are%20you%20using%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Echeers%26nbsp%3B%3C%2FP%3E%3CP%3EFederico%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1640844%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20i%20am%20unable%20to%20use%20SystemUpdate()%20inside%20my%20CSOM%20code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1640844%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F138334%22%20target%3D%22_blank%22%3E%40Federico%20Porceddu%3C%2FA%3Ei%20am%20working%20on%20sharepoint%20online%20..%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1652541%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20i%20am%20unable%20to%20use%20SystemUpdate()%20inside%20my%20CSOM%20code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1652541%22%20slang%3D%22en-US%22%3E%3CP%3EGreat!%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233354%22%20target%3D%22_blank%22%3E%40john%20john%3C%2FA%3E%26nbsp%3Bcan%20you%20confirm%20you%20are%20using%20this%20package%3F%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.nuget.org%2Fpackages%2FMicrosoft.SharePointOnline.CSOM%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nuget.org%2Fpackages%2FMicrosoft.SharePointOnline.CSOM%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%2C%3C%2FP%3E%3CP%3EFederico%3C%2FP%3E%3C%2FLINGO-BODY%3E
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