I have a custom field definition in VS2010 that contains a lookup field (Title). All is well and I can use the Title ref to add items in the SharePoint list UI. in the instance UI, I can also check one or more of the other fields, as a result of my lookup against my referenced list.
What If I want to include these additional fields in my list CAML definition ... Doesn't seem an obvious way to add to field ref or content type definition.
Indeed if you select a field in the uI and open Karine Bosch's fantastic CAML viewer you seem to get truncated name ... and not the internal name I used
<ViewFields>
<FieldRef Name='my_x0020_salary_x0020_Item_x0020_' />
</ViewFields>
I guess I need to test with the valid internal name however, it isn't obvious that the field is coming from the referenced list and not the current list definition. I will give this a go and report back unless any one in the SP community can advise....
Daniel