Skip to main content

SharePoint Online - Issue usingin creating Document Sets in Addwithin the SharePoint add-in web

improve format
Source Link

Good afternoon,

Has anyone experienced an issue within the last couple of days regarding using JSOM to create Document Sets within the SharePoint add-in web? I am working on a project where we had code running to create document sets on the fly which worked OK. There is now an "unknown" error appearing, with no changes to the code. Thanks in advance.

Update, use:

var docsetContentType = list.get_contentTypes().getById(docSetContentTypeID);

var docsetContentType = list.get_contentTypes().getById(docSetContentTypeID); 

instead of:

var docsetContentType = web.get_contentTypes().getById(docSetContentTypeID);

var docsetContentType = web.get_contentTypes().getById(docSetContentTypeID); 

And use the full content type IDcontent type ID for the document set.

Only issue now, is that the Server Relative URL is now Forbidden 403Forbidden 403, where it wasn't before? Anyone else seen this behaviour after fixing their doc set automation code?

Good afternoon,

Has anyone experienced an issue within the last couple of days regarding using JSOM to create Document Sets within the SharePoint add-in web? I am working on a project where we had code running to create document sets on the fly which worked OK. There is now an "unknown" error appearing, with no changes to the code. Thanks in advance.

Update, use:

var docsetContentType = list.get_contentTypes().getById(docSetContentTypeID);

instead of:

var docsetContentType = web.get_contentTypes().getById(docSetContentTypeID);

And use the full content type ID for the document set.

Only issue now, is that the Server Relative URL is now Forbidden 403, where it wasn't before? Anyone else seen this behaviour after fixing their doc set automation code?

Good afternoon,

Has anyone experienced an issue within the last couple of days regarding using JSOM to create Document Sets within the SharePoint add-in web? I am working on a project where we had code running to create document sets on the fly which worked OK. There is now an "unknown" error appearing, with no changes to the code. Thanks in advance.

Update, use:

var docsetContentType = list.get_contentTypes().getById(docSetContentTypeID); 

instead of:

var docsetContentType = web.get_contentTypes().getById(docSetContentTypeID); 

And use the full content type ID for the document set.

Only issue now, is that the Server Relative URL is now Forbidden 403, where it wasn't before? Anyone else seen this behaviour after fixing their doc set automation code?

added 437 characters in body
Source Link
alr84
  • 21
  • 8

Good afternoon,

Has anyone experienced an issue within the last couple of days regarding using JSOM to create Document Sets within the SharePoint add-in web? I am working on a project where we had code running to create document sets on the fly which worked OK. There is now an "unknown" error appearing, with no changes to the code. Thanks in advance.

Update, use:

var docsetContentType = list.get_contentTypes().getById(docSetContentTypeID);

instead of:

var docsetContentType = web.get_contentTypes().getById(docSetContentTypeID);

And use the full content type ID for the document set.

Only issue now, is that the Server Relative URL is now Forbidden 403, where it wasn't before? Anyone else seen this behaviour after fixing their doc set automation code?

Good afternoon,

Has anyone experienced an issue within the last couple of days regarding using JSOM to create Document Sets within the SharePoint add-in web? I am working on a project where we had code running to create document sets on the fly which worked OK. There is now an "unknown" error appearing, with no changes to the code. Thanks in advance.

Good afternoon,

Has anyone experienced an issue within the last couple of days regarding using JSOM to create Document Sets within the SharePoint add-in web? I am working on a project where we had code running to create document sets on the fly which worked OK. There is now an "unknown" error appearing, with no changes to the code. Thanks in advance.

Update, use:

var docsetContentType = list.get_contentTypes().getById(docSetContentTypeID);

instead of:

var docsetContentType = web.get_contentTypes().getById(docSetContentTypeID);

And use the full content type ID for the document set.

Only issue now, is that the Server Relative URL is now Forbidden 403, where it wasn't before? Anyone else seen this behaviour after fixing their doc set automation code?

Source Link
alr84
  • 21
  • 8
Loading