Skip to main content
Nintex Community Menu Bar

Forbidden Error

  • July 6, 2017
  • 2 replies
  • 48 views
  • Translate

I am using Office 365 and nintex forms and trying to get list item attachments in task forms. As the attachments doesn't come by default i am using javascript ajax call to get the attachment url but the ajax call is throwing Forbidden error.

 

In the developer tool i observed the error as -- required Cross Origin Resource Sharing (CORS). Here is my ajax call code. This code worked fine when i called in script editor web part.

 

NWF$.ajax({
              url: requestUri,
              type: "GET",
              dataType : "json",
              crossDomain: true,
              xhrFields: {                  withCredentials: true
              },
              headers: {
                  "accept":"application/json; odata=verbose"
              },
              success: onSuccess,
              error: onError
});

 

Please Let me know how can i resolve the issue.

Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+16
  • 914 replies
  • July 7, 2017

Try using a REST Call to your_sharepoint_site/_api/web/lists/getbytitle('Your list name')/items(item_ID)/AttachmentFiles

Translate

In my ajax call "requesturi" is the rest call only. it is the same url as you mentioned. when i browse the url in sharepoint site it is working but not in nintex form.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings