We have created a new Document Library that has a BCS connection to External Data source to reference data relating to the added documents. (Released version of SP2013)
There is a NameID field used as the External Data that we can see in the display list which shows the results we expect on all items in the list.
However, when we try to build a CAML query from the CSOM to filter on this NameID field, it doesn't work.
Examples of what we have tried. (these all return every item in the list, we just want them ones that have a NameID=10633)
<Query><Where><Eq><FieldRef Name='NameID' LookupId='True' /><Value Type='Lookup'>10633</Value></Eq></Where></Query>
<Query><Where><Eq><FieldRef Name='NameID' /><Value Type='Lookup'>10633</Value></Eq></Where></Query>
<Query><Where><Eq><FieldRef Name="NameID" /><Value Type="BusinessData">10633</Value></Eq></Where></Query>
There are two other columns we include through the BCS that we can run a CAML query on and get the expected results.
This works ok on "NameID: TypeDesc" which is from the same external data source
<Query><Where><Contains><FieldRef Name="NameID_x003a__x0020_TypeDesc" /><Value Type="Note">Ex-</Value></Contains></Where></Query>
Is it not possible to run a CAML query on the 'primary' External Data column?
Thank you.