2

When you drag and drop single / multiple files into a document set / library, SharePoint just add values to the required fields and a check the file out.

I've tried to use quick edit but it does not work to change content type. The only way is to edit properties and then check it in.

Is there a quicker way to change content type on a single file?

  • So what is the Question? – Ankit Kumar Aug 3 '16 at 9:26
  • I'm looking for a way to automate the updating of thousands of documents from legacy content types to a new format. Are there 3rd party tools that can do this? Does anyone have scripts to share that can do this? Thanks! – MacPhapolis Jun 14 '17 at 17:54
  • Hi and welcome to SharePoint.StackExchange . You have posted a new question in the answer field, and I would advise you to ask a new question instead. Use the "Ask Question" button in the upper right corner. You can always find out more in the Help Section – Mohamed El-Qassas MVP Jun 14 '17 at 18:47
3

No other way around.

Each content type has its own set of fields. Quick edit don't have the flexibility to switch fields dynamically based on the selected content type.

  • The only other ways are to use PowerShell or a third party tool like Sharegate. They have an incredible support and development team. :D – Chiramisu Jan 6 '18 at 0:20
0

Could you just create a new document library with only the one content type available and move the files into the new library? That should change them all at once, no?

0

You can also change the content-type by Javascript REST:

// item = { __metadata: {type: SP.Data.xxxListItem }, ContentTypeId: "0x1234123421341234"} 
function UpdateListItem(listName, itemId, item) {
    return jQuery.ajax({
        url: encodeURI(_spPageContextInfo.webServerRelativeUrl + "/_api/web/lists/getbytitle('" + listName + "')/items(" + itemId + ")"),
        type: "POST",
        data: JSON.stringify(item),
        headers: {
            "Accept": "application/json; odata=verbose",
            "Content-Type": "application/json;odata=verbose",
            "X-RequestDigest": $("#__REQUESTDIGEST").val(),
            "X-HTTP-Method": "MERGE",
            "If-Match": "*"
        }
    });
}

You can assign this function to a button or something, or the other way is to create a flow with trigger when item created, and send similar http request to sharepoint to update the content-type

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.