AWG Blogs

Thursday, February 2, 2012

LookupColumn fields require no FieldRef?

That appears to be the case when writing the CAML for a custom field.

I asked the question as it concerns FileLeafRef on MSDN. We'll see if I get a response or pointed to some more documentation.

I did notice in
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\XML\FLDTYPES.XML that the definition for File has its InternalType set to Lookup, so maybe that's my answer.

What got me curious is observing that updates to my computed column via /_layouts/FldEdit.aspx caused the whole FileRefs element to be removed! I noticed that the doclib list continued to show the field, but the list did not. Presumably because the fieldref was not needed...

More questions along these lines:

Why is the FieldRef Name="Created" necessary in a custom computed "Name" field in a document library, but not in a custom computed "Title" field in a List?

How come <Column Name='Created_x0020_Date' /> causes "Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)" YSOD, when clearly the documentation states that it should return an integer, since it's a lookup type.

No comments:

Post a Comment