public async Task <IField> AddTaxonomyMultiAsync(string title, FieldTaxonomyOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } // Prep generic creation structure TaxonomyFieldCreationOptions creationOptions = new TaxonomyFieldCreationOptions { MultiValue = true, TermStoreId = options.TermStoreId, TermSetId = options.TermSetId }; creationOptions.ImportFromCommonFieldOptions(title, options); // Step 1: create the field var newField = await AddFieldAsync(creationOptions).ConfigureAwait(false); // Step 2: make it a taxonomy field (depends on CSOM) await WireUpTaxonomyFieldAsync(newField as Field, creationOptions).ConfigureAwait(false); return(newField); }
public IField AddTaxonomyMulti(string title, FieldTaxonomyOptions options) { return(AddTaxonomyMultiAsync(title, options).GetAwaiter().GetResult()); }