tkoch
(Theodore Koch)
February 20, 2018, 8:49pm
1
Can someone else confirm, but it appears like this endpoint only returns operations when the job I am filtering by is closed. It never returns anything if the job is either open or complete.
https://server/epicortest/api/v1/Erp.BO.JobEntrySvc/JobOpers?$filter=JobNum eq ‘jobnum’
This should return all operations regardless of job status.
tkoch
(Theodore Koch)
February 20, 2018, 10:10pm
3
I agree, that’s why I am asking if anyone else is getting the same result as I have described above.
I tried it on a few different versions and got the same results on each. What Epicor version are you on?
1 Like
I tried it on our version of 10.1.600.13 and it is returning as expected based on that filter as well.
tkoch
(Theodore Koch)
February 20, 2018, 10:51pm
6
Tried on 10.1.500.19 and 10.2.100.8
Getting mixed results, I opened a job and it still returned operations as expected, but other jobs return nothing even though there are operations on that job. Very strange.
Olga
(Olga Klimova)
February 20, 2018, 11:07pm
7
Probably REST record limit should be checked in web.config.
Try to add the following line into the web.config, appSettings section:
<add key="DefaultMaxRowCount" value="0" />
and check if it helps.
Try this once. There is bug with this that only returns the last op but just curious if your job comes back
https://server/epicortest/api/v1/Erp.BO.JobEntrySvc/JobOpers(‘COMPANY’,‘JOBNUM’)
tkoch
(Theodore Koch)
February 21, 2018, 2:36pm
9
Olga:
Probably REST record limit should be checked in web.config.
Try to add the following line into the web.config, appSettings section:
<add key=“DefaultMaxRowCount” value=“0” />
and check if it helps.
After making this change the above call never finishes.
I don’t think that is a valid filter for JobEntrySvc/JobOpers.
The below did work, but https://server/epicortest/api/v1/Erp.BO.JobEntrySvc/JobOpers?$filter=JobNum eq ‘000123-09-05’ doesn’t return anything.
https://server/epicortest/api/v1/Erp.BO.JobEntrySvc/JobOpers(100,000123-09-05,0,10)
tkoch
(Theodore Koch)
February 21, 2018, 2:40pm
10
Is this something support will look at if I call them?
jgiese.wci
(Joshua Giese)
February 21, 2018, 2:41pm
11
Not likely, your best support on REST is already here on the forum. You’ve confirmed using the BL Tester that you get the results you are looking for?
tkoch
(Theodore Koch)
February 21, 2018, 2:47pm
12
Here is a screenshot of the BL Tester, the JobOperSearch.GetRows should return the same result as https://server/epicortest/api/v1/Erp.BO.JobEntrySvc/JobOpers?$filter=JobNum eq ‘000123-09-05’
jgiese.wci
(Joshua Giese)
February 21, 2018, 2:59pm
13
Well in BL Tester you are using a different BO though. There you used JobOperSearch in the API you used JobEntry. Can you test again using the JobEntry BOs
tkoch
(Theodore Koch)
February 21, 2018, 3:14pm
15
It’s also strange the web.config change Olga suggested made the JobEntrySvc/JobOpers never produce a response.
jgiese.wci
(Joshua Giese)
February 21, 2018, 3:24pm
16
I’d say there is a problem with how the REST API is returning the data then. In what you are trying to do can you use the JobOperSearch endpoint from REST that should work fine. I’ve also found that the subtable calls from REST can be sketch at times.
tkoch
(Theodore Koch)
February 21, 2018, 3:31pm
17
I originally wanted to use JobOperSearch, but Update does not work.
I was wanting to leverage JobEntrySvc/JobOpers to make the dataset as small as possible and also use that to update JobOper rows.
I can just use JobEntry.GetByID and Update methods.
This works just fine and returns the job and last operation for me (buggy). If I specify assemblyseq and oprseq I still get last only.
If I use the JobNum eq ‘blah blah’ I get all jobs back in 10.1.600
I found sometimes it is easier to create a simple BAQ with a parameter and use REST that way to get data I need but that does also add another layer
tkoch
(Theodore Koch)
February 21, 2018, 3:40pm
19
Yea, the problem is I also need to update job operations. I think the only reliable way is with Custom Methods it seems like.