I'm working with WSS 3.0, building a customized SharePoint site using .NET 3.5 and SPVisualDev. I have edited the FeatureEventReceiver.cs in the List area to add a new column to the User Information List ("AvailableHours"). When I go into the site after building, I can see the new column in the User Information screen. However, when I try to access this column programatically, I am told the column doesn't exist.

I have used elevated privileges but this is having no effect. Does anybody have an idea about what I'm doing wrong?


Try installing the Codeplex project SharePoint Manager 2007, and browse for your new column via the object hierarchy. http://spm.codeplex.com/Wikipage

You might need to access it via it's internal name.

  • 1
    Turns out what I thought had been set as the internal name for this column hadn't been set. Thanks for the link - I've been using the U2U CAML Query Builder but this is very handy! – grimorde Apr 19 '10 at 14:56

Choice fields are often used within SharePoint lists to display choice options like Gender, Status, etc and these choice options can be displayed using Radio Button and Dropdown formats.

Provided below is a code sample in C#.Net which describes the creation of a choice field programmatically using SharePoint API.

/* get the newly added choice field instance */ SPFieldChoice chFldGender = (SPFieldChoice)lst.Fields["Gender"];

hope it did answer the question.Any suggestions are appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.