GetListItems inside Nintex form in Office 365

Dec 16, 2014 at 3:03 PM
Hi,

I'm trying to use the GetListItems function from SPServices (jQuery Library for SharePoint Web Services - Home ) inside a Nintex form to get list items from a specific list. From what I checked on the internet, my code should be fine, but it always fails and nothing is displayed.

While debugging I get the
Uncaught SecurityError: Blocked a frame with origin "https://formso365.nintex.com" from accessing a frame with origin "https://mycompany-6a0637eeab73f8.sharepoint.com". Protocols, domains, and ports must match. error in the Chrome console. Where mycompany is ofcourse my tentant name.

The code I'm using is the following:
console.log(NWF$().jquery);
NWF$(document).ready(function() {
console.log('my function has started');
console.log(NWF$().SPServices.Version());
    NWF$().SPServices({
        operation: "GetListItems",
        async: false,
        listName: "Incident history list",
        CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
        CAMLQuery: "<Query><OrderBy><FieldRef Name='Title' Ascending='true' /></OrderBy></Query>",
        completefunc: function (xData, Status) {
            NWF$(xData.responseXML).SPFilterNode("z:row").each(function() {
              var title = (NWF$(this).attr("ows_Title"));
                var liHtml = "<li>" + title + "</li>";
                NWF$("#historyList").append(liHtml);  
            });
        }
    });
});

The SPServices.Version() command logs the version to the console, so everything with the SPService and NWF$ part is working, it's on the GetListItems that the issue is happening.

Does anyone know if there is something wrong with this code, or I need to change or add something?

Thanks in advance!