I'm trying to create site-columns with following types: Text, Note, Number, Choice, User, MultiUser, MultiChoice
I've implemented it for all the types except for User, MultiChoice and MultiUser. Can't seem to find how to achieve it. This is what I've achieved so far.
StringBuilder choiceFieldGenericShema = new StringBuilder();
choiceFieldGenericShema.Append("<Field Type='Choice' Format='Dropdown' Group='{1}' Name='{0}' DisplayName='{2}' Status='{3}' > <CHOICES> ");
choiceFieldGenericShema.Append("</CHOICES> </Field> ");
string choicFieldSchema = string.Format(choiceFieldGenericShema.ToString(), columnItem.Title, columnItem.GroupName, columnItem.Name, columnItem.Status);
var newField = web.Fields.AddFieldAsXml(choicFieldSchema, true, AddFieldOptions.DefaultValue);
clientContext.Load(newField);
clientContext.ExecuteQuery();
Can anyone please suggest a way following the above method to achieve my task? Thanks in advance!