API support

CSOM SSOM

Can be deployed under

Web List Site

Notes

Provision checks if field exists looking up it by Id/Name property, then creates a new field.

Examples

Add multichoice field

var fieldDef = new MultiChoiceFieldDefinition
{
    Title = "Tasks label",
    InternalName = "dcs_ProgressTag",
    Group = "SPMeta2.Samples",
    Id = new Guid("b08325aa-a750-4bf9-a73e-c470b86d37c8"),
    Choices = new Collection<string>
    {
        "internal",
        "external",
        "bug",
        "easy fix",
        "enhancement"
    }
};

var model = SPMeta2Model.NewSiteModel(site =>
{
    site.AddMultiChoiceField(fieldDef);
});

DeployModel(model);