phpSPO icon indicating copy to clipboard operation
phpSPO copied to clipboard

Caml Query not working for document library

Open kmrshubham0 opened this issue 4 years ago • 1 comments

<View><RowLimit>100</RowLimit></View>. It retrieves all the items...If I give Scope to Recursive even though it is getting all the items.

kmrshubham0 avatar Jan 05 '21 05:01 kmrshubham0

Hi I've got the same problem with query and personally I've solved the problem without loading the items returned by getItems call in the context

for instance :

not working CAML $caml = "Your CAML"; $list = $ctx->getWeb()->getLists()->GetByTitle({TitleOfYourList}); $res = $list->getItems($caml); $ctx->load($res); $ctx->executeQuery();

working CAML $caml = "Your CAML"; $list = $ctx->getWeb()->getLists()->GetByTitle({TitleOfYourList}); $res = $list->getItems($caml); $ctx->executeQuery();

I don't know if this is the correct way to execute a CAML query or if there is a bug.

I'm using version v2.4.2 I know it's an old version and maybe the new version work differently.

axlthe1 avatar Aug 06 '21 10:08 axlthe1