Question

I am quite new here... Right now I am about to design a Workflow site in SharePoint but I have to limitations: 1- I´m not allowed to use any API, only Notepad++ (Portable, of course) 2- No SharePoint Designer.

Basically I have to code everything in the Content Editor Web Parts (what I learnt 2 days ago) through my JavaScript, HTML and CSS code in a library, or if this any probability to implement Code via Online would be great to know about new Technics!

So, by now I did 2 small things like forms coding JavaScript, but my question considering my Situation is.... What is really possible to do? Is there any tutorial to learn tricks, examples, or whatever just using code and the CEWP? I just want to practise and know probabilities to implement in my Project, actually the main Thing for me is adding fields in a site which upload the Content into a SharePoint list, but I#m not sure this is even possible!

Thank you very much in advance :-)

Was it helpful?

Solution

If you are stuck using JavaScript, you have a few options, and they depend on the version of SharePoint you are working with. And in each case, you will not be working with "no API", you will just not be using the server-side C# API. Instead you will be using client side APIs that are accessible via JavaScript. (They still count as APIs).

If you are using SharePoint 2013 or SP Online/Office 365 or SharePoint 2016, there is the JavaScript Client Object Model (aka JSOM), or there is a very robust REST API.

You can find tons of resources and examples of how to use the JSOM libraries or the REST API just by searching online. Here's one for JSOM, and here's one for REST.

If you are working with SharePoint 2010, there is a much more limited REST web service, but if you are on 2010 I would recommend looking into the popular SPServices JavaScript library that makes working with the 2010 web services much much easier.

In answer to your question "what is it possible to do", well, you can do just about anything - create fields, create lists, create list items and populate their fields, upload documents... almost anything you would want to do to interact with SharePoint you can do using JavaScript.

OTHER TIPS

I'm not sure how Notepad/Api are related in the context of your question. You can most certainly leverage SharePoint's REST api inside a CEWP or Script Editor Web Part. I would create a javascript file and store it in a library with versioning (e.g., Site Assets) and add a reference to it in a script editor web part. You can do this for your html and css files as well by referencing those with iframes and link tags in the web part. This makes it easier to keep some sort of source control within SharePoint, and it should help with organization as well.

See the JavaScript examples for SharePoint's REST api here.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top