This project has moved. For the latest updates, please go here.

Please translate SSOM to CSOM using SPServices REST ect....

Dec 22, 2014 at 1:54 PM
I've built plenty of webparts but now I'm venturing into CSOM (read: newbie). I've got several related lists that have a mix of one to many records. In the server world I would caml all the data together into C# objects....massage it thus...and loop through them building out grids lists and charts.

What are the major blocks of tasks if I were to do this using SPServices. Understanding that I really don't know where spservices begins or ends.

Would I..??...

Use SP Services to bulk grab all the rows (or can I use CAML) using XMLtoJSON and massage the JSON objects like I describe above (in c#)

I'm trying to understand when SPServices comes into play. In this instance, does it even belong.
Dec 23, 2014 at 1:12 PM
You've got the right idea, SPServices will help you get the data client-side. Then its up to you to format the results and build a UI. You can and should limit the results returned from the server by passing a CAML query into SPServices to filter the results, assuming you don't need all the data. If you're using one of the 2014.X releases, you can use $().SPServices.SPGetListItemsJson, which combines the steps into a single call (i.e. call the lists service and then XMLtoJSON, using a mapping generated by parsing the list schema). The SPGetListItemsJson documentation I linked above has an example of using it with a CAML query.