Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Get a reference to Site/List from within custom SPFieldLookup

$
0
0

I've created a custom lookup field inheriting from SPFieldLookup, added it to the custom content type and bound it to the list template through content type. All these are done during site provisioning.

I've an issue populating the lookup field as the SPContext.Current that I've used in the custom field code to load the lookup list and lookup field is null during site provisioning. The field works fine if I create that from UI after the site is created.

When I debugged the code during site provisioning, none of the lookup field properties are initialized. Work fine when I add that from UI.

so, how do we get the current site context, or list context during site provisioning. 


--Cheers


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>