I have been trying to hide the Taxonomy field “Property Documents Type” from the Welcome Page of the Document set in SharePoint Online using JSOM. I could get the WelcomePageFieldCollection using
documentSetTemplate = SP.DocumentSet.DocumentSetTemplate.getDocumentSetTemplate(clientContext,docSetCT); documentSetCTWelcomeFields = documentSetTemplate.get_welcomePageFields();
I also could also see the count of the welcomePageFields Collection decrease by 1 in the console when i remove the specific field “Property Document Type” from the collection. However on update it is not reflected int the document settings page.
var oListCTEnumerator = documentSetCTWelcomeFields.getEnumerator(); var documentPropertyType=""; while (oListCTEnumerator.moveNext()) { var deleteCTFieldName = oListCTEnumerator.get_current().get_title(); if(deleteCTFieldName == "Property Document Type") { documentPropertyType=oListCTEnumerator.get_current(); } } documentSetCTWelcomeFields.removeChild(documentPropertyType);// I also tried remove and removeFromParentCollection methods documentSetTemplate.update(); docSetCT.update(); clientContext.load(equityDocSet); clientContext.executeQueryAsync(Function.createDelegate(this, Succeeded), Function.createDelegate(this, Failed));
Can you please help me with some hint on what I might be doing wrong here ?