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

Any issues faced when using libraries and lookup columns?

Please share you thoughts and experiences as I am planning to use it.

share|improve this question
    
this question have many answers, so it should be marked as community wiki –  Anders Rask Aug 21 '10 at 20:32
add comment

1 Answer

up vote 2 down vote accepted

We have done quite a bit of work with the Microsoft SharePoint Guidance Repository code. We ran into issues using lists/libraries that contain lookup columns. This is because the code that fills the mapped properties of an entity from an SPListItem tries to get the value of the field using item[fieldmapping.ListFieldId] which of course doesn't work in the case of a lookup column.

We modified this code to check if the field was a lookup column first and if so pull the value out correctly using the SPFieldLookupValue class.

Hope this helps

Alex

share|improve this answer
    
Agree!! It's still evolving, Even I had to tweak the code to fit my needs , like avoid mapping the ID while updating, lookup columns..etc –  Vamsi Jun 2 '11 at 15:46
add comment

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.