1

I am in a need of some guidelines according developing in SharePoint 2013 Online. I want to learn developing on a sharepoint 2013 online site. Im using Content editor web parts and want to retrieve a list from my site, and now i wonder.

What to use to develop, javascript client object model, rest or something else? im so confused!

Can i use the json or csom in the editor web parts?

1

If you want to Develop in SharePoint Online you should look at the SharePoint Hosted Apps: http://msdn.microsoft.com/en-us/library/office/fp142379.aspx Maybe with Napa: http://msdn.microsoft.com/de-de/library/jj220038.aspx

If you persist on using Editor/ Script WebParts you may include jquery and user OData/REST it is very simple:

$.ajax({
        url: "/_api/web/lists/getbytitle('listname')/items", // Insert your listname here
        headers: { "Accept": "application/json;odata=verbose" },
        cache:false,
        success: function (items) {
          var itemsArray = items.d.results;  //now you can do whatever you want with your items
        }
    }); 
1

Here is a page of MSDN will help you learn how to write code to perform basic operations using the JavaScript client object model in SharePoint 2013. I always refer to this page when I'm developing SP 2013 app. http://msdn.microsoft.com/en-us/library/office/jj163201.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.