Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I can add new columns for common fields per example text, metadata etc. But I want to add Enterprise Keywords to my list automatically, this is a little reference about enterprise keywords. Source for Enterprise Keyword column.

 var textField = "<Fields><Method ID='1'><Field Type='Text' DisplayName='Tag' ResultType='Text'></Field></Method></Fields>";
 var metadataField = "<Fields><Method ID='1'><Field Type='TaxonomyFieldType' DisplayName='Taxonomy' ResultType='TaxonomyFieldType'></Field></Method></Fields>";

    operation: 'UpdateList',
    listName: "Shared Documents",
    newFields: metadataField,
    completefunc: function(xData, Status) {
        tp1 = xData.responseText;
        tp4 = tp1.indexOf("errorstring");
        if (tp4 < 0) {
            alert("Fields created!");
        else {
            // Error creating fields!
            alert("Error creating fields!");
share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.