I have a requirement where I have to select the values of a choice field while creating a new item using CSOM. I'm able to update other fields, but for choice column, the value gets stored in the Specify your own value column, although the values are present in that particular choice column.
I assume my syntax for updating choice column is not correct. Here is the code:
ClientContext clientContext = new ClientContext(siteUrl);
List oList = clientContext.Web.Lists.GetByTitle("testList");
ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
ListItem oListItem = oList.AddItem(itemCreateInfo);
oListItem["Name"] = "Sherlock Holmes";
oListItem["Phone"] = "0000000000";
oListItem["Address"] = "221B Baker Street";
oListItem["ChoiceOfCuisine"] = "Cajun,Persian cuisine,Zanzibari";
oListItem.Update();
clientContext.ExecuteQuery();