Using javascript and SharePoint's CSOM, can someone provide an example for the follow scenario:
Get field value from the selected items in a list (ListA).
Then for each item selected, take a fields value and use it to query a different list (ListB).
If the query returns 0 rows, create item in ListB and update selected item in ListA.
Else if the query returns 1 row, update selected item in ListA.
Using javascript and SharePoint's CSOM, can someone provide an example for the follow scenario:
Get field value from the selected items in a list (ListA).
Then for each item selected, take a fields value and use it to query a different list (ListB).
If the query returns 0 rows, create item in ListB and update selected item in ListA.
Else if the query returns 1 row, update selected item in ListA.
Share Improve this question asked Jan 25, 2013 at 3:19 pbenemypbenemy 331 gold badge2 silver badges5 bronze badges1 Answer
Reset to default 3This will get you started.
MSDN - How to: Complete basic operations using JavaScript library code in SharePoint 2013
It gives examples of how to
- Query lists and get value
- Add/update and delete records
- and many others mon operations
So, most of what you need to plete your scenario.