I'm trying to query a list in an eventreceiver through properties.List.GetItems (in the itemadding event). The field I'm filtering on is a 'Person or Group' field. But the query always returns all items instead of just the ones having the user I provided.
I'm using following code:
I've already checked following post: link but this didn't resolve my problem.
the query I use is:
<Where>
<Eq><FieldRef Name='Gebruiker' LookupId='TRUE' /><Value Type='Integer'>{0}</Value></Eq></Where>
I Also tried:
<Where><Eq><FieldRef Name='Gebruiker' LookupId='TRUE' /><Value Type='Lookup'>{0}</Value></Eq></Where>
Any help is welcome