Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Update choice field programmatically

$
0
0

Hi,

How to update a choice field?

I have a choice field(dropdown) in my custom list, which has the value as "Start", "In Progress", "End".

I would like to update the list items which have the value as "In Progress" to "End" programmatically.

Is the below code correct. I have not got any errors, however would like to know if the below is proper. I have not provided the condition in the below code, however the update code i have added

myListItem["ChoiceField"] = myList.Fields["ChoiceField"].GetFieldValue("End");
myListItem.Update();
myList.Update();

Thank you



Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>