A sample JS to clear the taxonomy field value using the JS CSOM. example: var context = SP.ClientContext.get_current(); var list = context.get_web().get_lists().getByTitle("list title"); var listItem = list.getItemById(58); var field = list.get_fields().getByInternalNameOrTitle("taxonomyfieldname"); var taxField = context.castTo(field, SP.Taxonomy.TaxonomyField); listItem.parseAndSetFieldValue("taxonomyfieldname", ""); listItem.parseAndSetFieldValue("taxonomyfieldnameTaxHTField", ""); listItem.update(); context.load(listItem); context.executeQueryAsync(function () {},function(){}); The above code clears the ...

Read More

A sample JS to modify the list choice field options. var context = new SP.ClientContext.get_current(); var web = context.get_web(); var cldList = web.get_lists().getByTitle("Calendar"); var categoryField = cldList.get_fields().getByInternalNameOrTitle("Category"); var categoryChoiceField = context.castTo(categoryField, SP.FieldChoice); context.load(categoryChoiceField); context.executeQueryAsync(function () { var categoryChoices = categoryChoiceField.get_choices(); var categoryTC = categoryChoices.filter(function (choice) { return choice === "MyEvents"; ...

Read More