2

I am trying to fetch information from an external list using the following CAML query.

<Where>
  <Eq>
    <FieldRef Name='EventID' />
    <Value Type='Guid'>98f68099-2ec8-4b68-95dc-607f0d50520b</Value>
  </Eq>
</Where>

The EventID field's type is Guid both in the database and the model. The List.GetItems methods throws the exception with the message "FieldRef". Just this message. The line

Debug.WriteLine("Static Name: " + field.StaticName + " - Internal Name: " +     field.InternalName + " - Type Display Name:" + field.TypeDisplayName);

gives the following information just before the List.GetItems call

Static Name: EventID - Internal Name: EventID - Type Display Name:Guid

Any idea how to resolved this. Any help would be greatly appreciated.

Thanks.

1 Answer 1

1

You need to enclose the above CAML query in a <Query> Element. Also, you may want to include the <Method Name=Resolve List /> element.

One thing you'll need is to list all the fields you'll want visible in the ViewFields element.

Here's a link that'll hopefully help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.