When to use camlQuery?
-
08-02-2021 - |
Question
When interacting with Sharepoint 2013 or Sharepoint Online, is the use of camlQuery recommended? I've had to pick up some CSOM knowledge of late on the fly via C#. I am having some success with it, and using Linq to get at what I need. For example: List.RootFolder, GetListByName, RootFolder.FindFiles, etc.
Are there actions you must use camlQuery for? Is everything you need accessible via the object model? Thanks
Solution
caml query helpful when you need filter(complex filter logic) data. Query schema
You could use rest api to get data also.
pnp library become popular, it'll help you code less.
Also check below official guideline to choose right solution.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange