Rest Query Requires Top Function

I am seeing unexpected behavior when querying Job Operations data using Epicor’s Rest API.

I have a Job (HB_1000_T2) with Operations.

Using the Erp.BO.JobEntrySvc/JobOper service…

I run a simple query using the Job Number in the filter…

Notice that even though there are Job Operations in the system, the Rest query returns no data.

But when I put a high enough value in the top function of the query, values get returned…

It doesn’t seem right that the query only returns the results only when the top function is used. This is an Epicor hosted environment, so I assume the the server and the Rest API are setup correctly.

What am I missing?

Thanks for your help.

Michael

I know this was from a year ago but wondering if anybody answered this question. I experiencing the same issue. Thought I was doing something wrong.

This is a problems with row limit and GetRows procedure.

By default only first 100 rows are returned from each table, starting from the top. So whne you ask for rows from the child table, top 100 rows are taken from top table, then child rows for that parent rows are found and filter is applied to them. If child table row you want to find does not belong to any of 100 parent rows, nothing is returned.

If you are not in Saas, then you can remove row limit in web.config. In Saas you can only use $top to override the limit.

1 Like

Thanks for the explanation. If I have a large table my queries are going to take a long time. The tables are going to get large and I’ll never know what to set $top to. Thanks again.

1 Like

You can create BAQ and use it in OData call instead

Thanks again. Looking into creating a BAQ.

THANKS! I created a BAQ and it works great.

1 Like