I recently used Chris O’Brien’s approach to create lookup columns as a feature, and it works great.
After some time, I was making a query to the SharePoint webservice, for some reports I was making – by the way, I’m using Enesys RS Data Extension for this job, I can recommend that product, it makes it much easier to write queries to SharePoint lists.
So I noticed that the columns made with Chris’s approach was not included in the response!…. Strange…
I was able to access the fields via the Object Model without problems.
It took me quite some time to figure out, but eventually ended up compairing the SchemaXML to a regular lookup column, made in the SharePoint UI.
And there were some differences.
On my custom made lookup columns there was a namespace attribute.
After removing the attribute in the FeatureActivated method everything is running as it should.
Thanks to Frederic from Enesys for pointing me in the right direction!