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
Post a Comment