Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to change sharepoint site column ...

for example i wanted to change Task Status choices with writing in eventt Receiver
but my code didn't work
i don't got error .. but task status dosen't change

C#
 SPWeb web = properties.Web;
SPContentType contentType = web.ContentTypes["Task"];
string coulmn = "Task Status";
SPFieldChoice contentTypeField =(SPFieldChoice) contentType.Fields[coulmn];
contentTypeField.Choices[1] = "New Choices";
contentTypeField.Update();
Posted
Updated 17-Sep-14 8:43am
v3
Comments
ZurdoDev 17-Sep-14 12:31pm    
Did you get an error?
farham_heidari 17-Sep-14 14:46pm    
i don't get error .. but task status dosen't change

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900