AnsweredAssumed Answered

Connect to SharePoint through a Custom Widget

Question asked by soldous on Nov 1, 2016
Latest reply on Nov 7, 2016 by soldous



I need to send a file from my widget to SharePoint site on button click. First I tried to connect to SHP via SHP REST API. In my function I have this code get from Complete basic operations using SharePoint 2013 REST endpoints :

var appweburl = "";
        var executor = new SP.RequestExecutor(appweburl);
                 appweburl +
                 "/_api/SP.AppContextSite(@target)/web/lists?@target='" +
                 hostweburl + "'",
              method: "GET",
              success: successHandler,
              error: errorHandler

I need to define a SP.js file in a header if my widget code but I don't know how. This file should be a part of SharePoint installation folder I guess. But how can I referenced it in my widget?
Thanks for any help.


Zdenek Soldan