MYOBCommunity
Partner Zone
|
|
Partner Zone

GetRange returns all records even when filter is on

This thread is now closed to new comments.
Some of the links provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
1 REPLY 1
Experienced Cover User kjm
40 Posts
Experienced Cover User
Australia
kjm
Experienced Cover User

40Posts

3Kudos

2Solutions

Re: GetRange returns all records even when filter is on

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

Experienced Partner Kruts
11 Posts
Experienced Partner
Kruts
Experienced Partner

11Posts

1Kudos

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