c# - object does not belong to a list error when loading file using clientcontext -


i trying load file , properties in sharepoint

microsoft.sharepoint.client.file newfile = null; newfile = clientcontext.web.getfilebyserverrelativeurl(relativeurl);  listitem item = updatefile.listitemallfields; clientcontext.load(item, => i.fieldvaluesastext, i=> i.contenttype  ); clientcontext.load(newfile , => i.checkouttype, => i.listitemallfields); clientcontext.executequery(); 

this throws "object not belong list" error when library name , content type name of file same

works fine otherwise

what causing issue?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -