SharePoint - creating a folder using javascript on Nintex classic forms

Copper Contributor

I have a script im working on that is currently not doing anything but is supposed to create a folder in a document library based on a field in Nintex classic form. My code goes like this:


function folderCreate()
appweburl = '';
hostweburl = '';
listNameTower = "Attachments";
var scriptbase = hostweburl + "/_layouts/15/";
NWF$.getScript(scriptbase + "SP.RequestExecutor.js", execCrossDomainRequestTowers);
function execCrossDomainRequestTowers() {
var executor3 = new SP.RequestExecutor(appweburl);
var uurl = appweburl + "/_api/SP.AppContextSite(@target)?@target='" + hostweburl + "/_api/contextinfo;SameSite=None;Secure'";
url: uurl,
method: "POST",
headers: { "Accept": "application/json; odata=verbose" },
success: successHandlerFolder,
error: errorHandlerFolder


can you please help me/advise what is missing on this script?

0 Replies