Represents a field in a list on a SharePoint Foundation Web site.

learn more… | top users | synonyms

3
votes
1answer
291 views

Placing CompositeFields for multiple list items on one form doesn't work as expected

In a workflow task, in custom edit form, i use CompositeField to render relevant fields current task item and for workflow item by setting a different context for CompositeField. However if i put ...
0
votes
1answer
513 views

Custom Field value not visible on a view

I have created a custom field based on SPFieldUrl. What I want, is basically just a normal Url field functionality, but I don't want it to be visible when new item is added to the list (a webpart is ...
3
votes
1answer
1k views

SP2010 Relational Lists - User Objects show “#VALUE!” instead of value

I know I'm just doing something wrong here but after I create a SPFieldLookup object, attaching to content type, and then adding to list, all looks fine. I then add an item to the parent, which in ...
2
votes
2answers
644 views

Why do I get a security validation invalid error updating a field from a feature receiver?

Trying to change the title field of a document library to be required..doesn't want to work. SPList docLib = web.Lists["Process Aids"]; SPField field = docLib.Fields["Title"]; field.Title = "Display ...
1
vote
3answers
981 views

Multilanguage fields in programatically created list

If I'm creating a custom list in my code, how can I make fields localized, so when user has set e.g. Polish, he can see field names in polish and when he has English language set, he can see field ...
3
votes
6answers
4k views

ArgumentException when trying to access SPListItem value

I have a tool to update all items in SP (link replacement). The tool works most of the time but sometimes it throws me an ArgumentException ("Value does not fall within the expected range."). Here is ...
9
votes
2answers
10k views

How do I convert SPUser to SPFieldUser?

I have a field in a list that accepts an SPFieldUser object. I have an SPUser object that I would like to populate that field with, but I cannot implicitly convert from one to the other. How would I ...
1
vote
2answers
3k views

How to have a column contain multiple users

I have a list with various columns. One of those columns is to store users. However, when I use the code configurationListFields.Add("Limit_Access_To", SPFieldType.User); I am only allowed to ...
1
vote
1answer
1k views

How to make field text bold in custom edit form?

I am already using custom field iterators to customize the fields on my list forms. When users are creating or editing a list item, I want certain field names to show in bold. For example, when users ...
8
votes
3answers
3k views

Is there a way to see if an SPField was created by a user?

I have some code where I am going through all of the Fields that belong to a content type. I'm curious if there is a way to check to see if the SPField was created by a user or if it is a system ...
2
votes
2answers
1k views

SetCustomProperty within OnSaveChange

Saving Custom Field Type properties using SPField.SetCustomProperty within the IFieldEditor.OnSaveChange event does not seem to work, for reasons explained elsewhere. I've seen all kinds of bodges ...
5
votes
4answers
22k views

How to set ListItem Lookup Field value

How do I set a ListItem's Lookup field using code? SPFile file = list.RootFolder.Files.Add(destUrl, iStream, true); SPListItem item = file.Item; item["DocumentID"] = DocID.ToString(); ...