Add, update and query SharePoint list items from CSOM using javascript

Using javascript and SharePoint CSOM, someone can provide an example for the following scenario:

Get the field value from the selected items in the list (ListA).

Then, for each selected item, take the field value and use it to query another list (ListB).

If the query returns 0 rows, create an item in ListB and update the selected item in ListA.

Otherwise, if the query returns 1 row, update the selected item in ListA.

+3


source to share


1 answer


This will help you get started.

MSDN - How to Perform Basic Operations Using JavaScript Library Code in SharePoint 2013

Here are examples of how



  • Query Lists and Retrieving Values
  • Add / update and delete records
  • and many other common operations

So, most of what you need to complete your script.

+3


source







All Articles