Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer
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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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