Reputation: 2170
What is the correct way to filter w.r.t. multiple fields when applying $filter command on more than one field/value pair from JavaScript?
Upvotes: 7
Views: 13880
Reputation: 39200
It's very canonical.
http://192.168.75.8:5555/Konrad01/
xrmservices/2011/OrganizationData.svc/
LeadSet%28%29?$filter=
Field1%20eq%20%27Value1%27%20and%20Field2%20eq%20%27Value2%27
EDIT:
More readable version.
http://Server:Port/Organization/XrmServices/2011/OrganizationData.svc/
LeadSet()?$filter=Field1 eq 'Value1' and Field2 eq 'Value2'
Upvotes: 8
Reputation: 18895
Put an and
in between
Example:
http://YourServer.com/YourOrg/xrmservices/2011/OrganizationData.svc/ContactSet()?$filter=FirstName eq 'George' and LastName eq 'Washington'
Upvotes: 4