Hi,
I have a fairly complex question but greatly need some advice.
I have provisioned a lookup list as part of a feature (see below). I need to
provision the lookup field as I also provision a Contenttype and list which
referene the Content Category Type field. I would rather not create the
lookup via code and then add the field everywhere too all the ContentTypes
and Lists etc.
When the feature is activated, I relink the lookup column to the correct
lookuplist and pushChangesToLists. This all works great.
Except for when I try and add a new document via word. The Word 2007
Properties Ribbon throws the following exception (see below).
The Content Category Type List Id does not equal
48EF8CB2-5CB9-4B57-9C60-D1F366FEC2F2 and the lookupfield is pointing to the
correct list Id. This does not make sense!
After throwing the exception, the ribbon loads but the dropdown has no data.
PLEASE HELP!
Thanks Heaps.
*LookupField*
<Field Type='Lookup' DisplayName='Content Category Type'
Description='Content Category Type.' Required='TRUE'
ShowField='Title' UnlimitedLengthInDocumentLibrary='FALSE'
Group='Science Columns' ID='{0881a18a-97c1-40fe-ad37-953e2705e166}'
SourceID='{7cab3658-0113-46ee-87ff-ca8043ecb91b}'
StaticName='Content_x0020_Category_x0020_Type'
Name='Content_x0020_Category_x0020_Type' />
*Update LookupField*
SPFieldLookup field = (SPFieldLookup)web.Fields["Content Category Type"];
SPList list = web.GetListFromUrl("/Lists/Content Category Type/All
Items.aspx");
if (list != null)
{
field.LookupList = list.ID.ToString();
field.LookupWebId = web.ID;
field.Update(true);
}
*Exception*
The query cannot be run for the following DataObject:
list_48EF8CB2-5CB9-4B57-9C60-D1F366FEC2F2
Document Information Panel cannot run the specified query.
The SOAP response indicates that an error occurred on the server:
Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was
thrown.
<detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">
List does not exist.
The page you selected contains a list that does not exist. It may have
been deleted by another user.
</errorstring><errorcode xmlns="
http://schemas.microsoft.com/sharepoint/soap/">0x82000006</errorcode></detail<http://schemas.microsoft.com/sharepoint/soap/%22%3E0x82000006%3C/errorcode%3E%3C/detail>
>
------------------------------------------------------------------- OzMOSS.com
- to unsubscribe from this list, send a message back to the list with
'unsubscribe' as the subject.
Powered by mailenable.com