REST API Exception on JobOperSearch PATCH

Hi all,

I am getting an ApiException when I try to update a JobOper using the PATCH API.

I’ve tried to use every combination of parameters and input possible but have had 0 luck in updating an entry. I’ve tried single quotes around the strings and every PATCH format I can find but I’m not having any success.

I’m not that well versed on the business logic side of the object, but I am able to edit these fields through the E10 desktop app without any issues.

I was hoping that someone here had experience with the PATCH commands or could point me in the right direction as to why the errors might be happening.

We are working on updating Epicor to 10.2, but are currently running 10.1.500.18, not sure if that has any significance but figured I’d throw it in here.

Thanks in advance for the help!

Scratch previous comment. I reread the error.

I am not familiar with that Biz Object but glancing at the code, a direct update is blocked by the application code. Checking…

It looks like this API is blocking the update of objects and encouraging you to go thru another service (I wish they had indicated which service to use instead but …).

The normal process is to turn on a trace and use the UI to determine which services are invoked . That’s why the trace and tech help exists on the client. I would assume if you want to update JobOper you would use JobEntry but that is a shot in the dark. Doing a quick trace would confirm that.

Thanks for the fast response!

You’re right it would be nice if the error said exactly what’s happened… but what fun would that be :stuck_out_tongue:

I will start there doing the trace and trying to go through the Job Entry.

Out of curiosity, why expose an API to update an object if you have to go through a different object? Maybe that’s out of the scope here, but seems misleading.

Thanks again!

It a limitation in the framework since V8 that I wanted to tackle in E10 but never had a chance. We need more granular control of the core methods than all (BO) or nothing (Lib and ‘simple BO’).

Think about the Zdata / Meta system / Data Dictionary for ERP 10. We only control data payloads, not services / methods. When we can approach that, we can do some more tricks. It has never bubbled to the top of the UX stack to tackle. As we are transitioning to considering integrations as important as forms (or more), we are looking all over at things like this with a fresh perspective on making them friendlier.

3 Likes

Services with Search in the name are usually read only. So you have to use some other object to update data.

6 Likes

Thank you Bart and Olga for the guidance!

I have successfully edited fields in a JobOper entry using the PATCH command in Erp.BO.JobEntrySvc.JobOpers({Company},{JobNum},{AssemblySeq},{OprSeq}). It returns a 204 No Content response, even though it changes the table based on the input I provide.That’s strange but not a big deal since I just can perform another read to verify the input took.

The bigger issue is I can’t seem to get any continuity between which JobOper is being pulled between the above service, Erp.BO.JobEntrySvc/JobOper with filtering, and the Erp.BO.JobOperSearchSvc/JobOperSearches({Company},{JobNum},{AssemblySeq},{OprSeq})

The below image is each service with the same parameters for each. Each is returning a different table.

The only one that I can get to return the correct table is the JobOperSearchesSvc.
Erp.BO.JobEntrySvc.JobOpers({Company},{JobNum},{AssemblySeq},{OprSeq}) will only pull the table of OprSeq 10 regardless of what the OprSeq parameter is.
Using the generic Erp.Bo.JobEntrySvc.JobOpers with filters returns an empty table. Interestingly enough, this will pull a few job numbers from 2013, but none after that. I can’t find any rhyme or reason for it.

Hopefully I’m just doing something wrong, but these aren’t following suit with the other GET methods I’ve used through the E10 REST API in the past.

Yes, this is a bug, that was fixed in later release.

1 Like

Hi @Olga, can you confirm this was fixed? I am getting this error in 10.2.700.10 REST API v1 or was this only fixed in the v2 REST API?

image

I don’t know, probably only in v2. You should try.

Hi @Olga, I just tested the v2 API and same result as v1

So this error comes from the BO , are you sending a Before Imge? Is the Job Released / Engineered?

This is the job I am targeting… what do you mean by before image @josecgomez?

So the job is Engineered and Released in most cases you can’t make updates to engineered / firmed jobs. Is that setting turned off in your company config?

A Before Image means you should send the same record as it originally came along with the modified version. (Before Image meaning the Before (not modified) and the After (modified)) is a throw back to the Progress Days but its how epicor figures out what (if anything) you Changed.

I can manually go in and update the job ops in job entry. It’s not a huge deal, I can just use JobEntrySvc but JobOperSearchSvc makes it easier if it would work

oh you are trying to use the JobOperSearchSvc to do the patch?
I’m pretty sure that’s a read only Business Object

Yeah I just checked it only implements GetList and GetRows

You should be able to use the JobSvc OData Endpoint though like this

Good point @josecgomez I’ll give that a go