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?
You can use filter expressions in OData requests to filter and return only those results that match the expressions specified. You do this by adding the $filter system query option to the end of the OData request.
You can find details on filter specification in the OData spec filter options section. Examples: All products with a Name equal to 'Milk': http://host/service/Products?$filter=Name eq 'Milk' All products with a Name not equal to 'Milk' : http://host/service/Products?$filter=Name ne 'Milk'
OData API filter value which you are selecting for $FILTER parameter is always case sensitive.
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'
Put an and
in between
Example:
http://YourServer.com/YourOrg/xrmservices/2011/OrganizationData.svc/ContactSet()?$filter=FirstName eq 'George' and LastName eq 'Washington'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With