I have created a custom lookup field inherited from SPFieldLookup. It works exactly like SPLookupField but allows user to add new values. These new values gets added in the Lookup list and becomes available next time in the drop down.
To achieve this, I am first checking the value in lookup list. If value exists then I just return the normal "ID;#Value" otherwise; I first add the new text value to the target list and then return the newly added item's "ID;#Value" pair.
My Field is working fine if I add it in any list where "Folder" is not a default content type. For example, I can create a custom list and add my custom lookup field as a column. It works perfectly.
The problem is with "Discussion Board". In Discussion Board, whenever user enters a new value in custom lookup column, a new item added to the lookup list, as expected, but the content type of new item is always "Folder" instead of normal "Item".
I have tested my field with different types of list but there is no issue with anyone of them except "Discussion Board" list. I don't know why new item automatically becomes "Folder" in Target List, if field is used in "Discussion Board".
Can anybody help? It is very urgent please!!!