MYOBCommunity
Partner Zone
|
|
Partner Zone

GetRange returns all records even when filter is on

1 REPLY
Experienced Cover User kjm
36 Posts
Experienced Cover User
Australia
kjm
Experienced Cover User

36Posts

3Kudos

2Solutions

Re: GetRange returns all records even when filter is on

the problem was the UrlEncode...once removed all works fine

Partner Kruts
3 Posts
Partner
Kruts
Partner

3Posts

0Kudos

0Solutions

GetRange returns all records even when filter is on

I am using the .NET SDK and querying hte employeeService...when I use the filters below it does not seem to filter only return all records...any ideas what I am doing wrong

 

When I run the query in POSTMAN it works fine

POSTMAN QUERY

http://localhost:8080/AccountRight/ac65a625-b0f6-47f4-99a8-ecdfc84422c4/Contact/Employee/?$filter=DisplayID eq 'PASEE123'

 

but when I construct it in the .NET SDK it does not filter

 

var pagedCollection = employeeService.GetRange(MyCompanyFile, HttpUtility.UrlEncode("?$filter=DisplayID eq 'PASEE123'"), MyCredentials);
var pagedColleaction = employeeService.GetRange(MyCompanyFile, HttpUtility.UrlEncode("?$filter=FirstName eq 'Paul'"), MyCredentials);

UPDATE: Have tried removing the ? from filter but it made no difference 

Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post