I am adding a custom ribbon button which needs to create a folder with specific content type id in a document library.
CommandAction="javascript:{
var options = {
url:'http://test-site-2019/test/Forms/Upload.aspx?RootFolder=%2FSCDM%26ContentTypeId=' + 'EACB0B22-9AAC-4291-A0EE-F91C3F66AC96',
title:'New Test Folder',
dialogReturnValueCallback: function (result, message) {
if(result === SP.UI.DialogResult.OK) {
SP.UI.ModalDialog.RefreshPage(result);
}
}
};
SP.UI.ModalDialog.showModalDialog(options);
}"
I am sharing the code above. Problem is that when click the button, the modal dialog is succesfully opening but showing the normal upload.aspx page which requires to upload file and then to fill the properties. The desire result is to show window which gives us the opportunity to type the name of the folder and the custom fields to fill and to be added to the document library. The Id which I am putting in the url is the content type id of the desired content type.
Any suggestions what I am doing wrong?