I had requirements in which I wanted to deploy my custom lists from one server to another server, I had generated my schema and forms files using solution generator tool, now when I open one of my generated schema file in which I have lookup columns linked to another custom list, I have observed that solution generator tool commented custom lookup columns, I mean it didn’t figured out which custom list to attached for lookup columns.
There are many ways to achieve these challenges, one way would be if we know GUID of custom list which we are going to look up on then we can write same GUID into list definition schema file, but in my case all custom list was deployed at same time, so I don’t know what’s GUID of lookup list.
Another solution I found was, we can write feature event receiver on custom list, so when feature install/deploy custom list at same time we can take lookup column list name and assign into lookup columns into list definition file.
But at the last I have found simplest solution to assign lookup values into list definition, there is property called "LIST" into fields columns for schema.xml file, so in same list definition file, we can write List="Name of List" for lookup columns, so it will attached lookup list name for columns.
I hope that above information makes some sense to reader, but if it’s too confusing then please let me know about your challenges we can work out :)
Enjoy!
Showing posts with label Solution Generator. Show all posts
Showing posts with label Solution Generator. Show all posts
Sunday, August 23, 2009
How to assign lookup values into List definition – schema.xml file
Labels:
assign lookup values into list definition,
custom lists,
custom lookup columns,
feature event receiver,
forms file,
GUID of custom list,
How to assign lookup values into List definition – schema.xml file,
List,
list definition schema file,
List=”Name of List”,
MOSS 2007,
schema file,
schema.xml,
SharePoint,
SharePoint Features,
Solution Generator,
solution generator tool
Subscribe to:
Posts (Atom)