Nov 16 2016 02:03 AM
Hello,
I am using the OfficeDev.Core to create DocumentSet "Folder" in sharepoint Online in a Provider Hosted Add-in in C#.
I am using the lastest CSOM C# library for Sharepoint On line :
Microsoft.SharePoint.Client.dll V16.1.5813.1200
Microsoft.SharePoint.Client.DocumentManagement.dll V16.1.5813.1200
This was working fine for months and yesterday we notice that the method Create from the class Microsoft.SharePoint.Client.DocumentSet.DocumentSet return an error unknown !
I use a AppOnly Access Token with highest permissions.
Do you have any ideas or workarounds to create a documentset with CSOM ?
Thanks
PS: I try to create this documentset with the UI and it works fine.
Nov 16 2016 06:25 AM - edited Nov 16 2016 06:27 AM
I find a solution on this post:
I experienced the same issue on my tenant on monday morning 14/11/2016
The creation of the documentset stop working suddenly
The existing code :
var devisCT = globalHostWeb.GetContentTypeByName(SPConstants.CTName_Devis);
dsQuoteFolder = rootFolder.CreateDocumentSet(folderName, devisCT.Id);
and solution that works for me is :
var devisCT = devisLib.GetContentTypeByName(SPConstants.CTName_Devis);
dsQuoteFolder = rootFolder.CreateDocumentSet(folderName, devisCT.Id);
I now take the content type from the Library where I want to create the documentset.
The ContentTypeId retrieved is longuer and this ID works.
You can notice that I use the method GetContentTypeByName and it works as well as the GetContentTypeByID.
Nov 16 2016 06:29 AM
I find a solution on this post:
I experienced the same issue on my tenant on monday morning 14/11/2016
The creation of the documentset stop working suddenly
The existing code :
var devisCT = globalHostWeb.GetContentTypeByName(SPConstants.CTName_Devis); dsQuoteFolder = rootFolder.CreateDocumentSet(folderName, devisCT.Id);
and solution that works for me is :
var devisCT = devisLib.GetContentTypeByName(SPConstants.CTName_Devis); dsQuoteFolder = rootFolder.CreateDocumentSet(folderName, devisCT.Id);
I now take the content type from the Library where I want to create the documentset.
The ContentTypeId retrieved is longuer and this ID works.
You can notice that I use the method GetContentTypeByName and it works as well as the GetContentTypeByID.
Nov 18 2016 07:11 AM
We are having the same issue with an app that has been working for a couple years.