Hello,
I am currently working to create a job in REST API
the method i want to call is GetNewJobHead. https://hostname/ERP102600/api/v2/odata/{company}/Erp.BO.JobEntrySvc/GetNewJobHead,
I want to know what input parameter I should give. Right now, I give only company and Plant for the input parameter. I don’t know if it is right or I need give more
Follow the client side trace when creating a job manually and look at what they are passing, then replicate that in your rest call.
For a header creation or “getanew” whatever in general, this will just create the dataset used to then modify and pass to other subsequent methods
You may find it easier to use the JobEntrySvc/UpdateExt process as it takes care of all the clutter that needs to be done in creating a new job. UpdateExt is what Updatable dashboards use to create/update records in Kinetic. It is also what our other integration products use.
With UpdateEXT, you do not have to “getnewjobhead” since that is automatically done. You dont have to do all the other things that are done in Job Entry either. you only need to populate the NEEDED fields (company, part number, description, etc) and it does the rest.
Hello Aaron,
for the trace, it give all dataset as input. but in the swagger, when I put the all initial dataset as the input parameter, the system return error. that’s why I don’t think we need pass all dataset as input. also, the dataset I pass was provided by the Swagger. i just copy and paste and I got the error but if I pass a small set like company, plant and it returns ok. so, that’s why I confused REST api, what input value I should give to the function.
Hello,
I have been working on create job process for a few days. below is my feedback to use Epicor REST API.
Not easy to prepare input parameters.
example, GetNewJobHead and Update method, the return object is parmeters->ds->Jobhead format
but GetByID method, the return object is retureObj->JobHead format. why Epicor change the return class structure. this cause programmer to reformat the class structure to match the GetNewJobHead and Update return class structure. you can create two different class structure. one is for GetNewJobHead and Update return class and another is for GetByID return class. but why we need do that. Epicor should keep the same return class structure.
the feature are the same when we are using dll and REST Api. so, it is very good. we don’t need change a lot in the coding. right now, I just follow the same logic in my code using dll to convert to use REST Api.
performance is ok so far. I did not do the stress test yet. but so far to create job and it seems no issue for the performance.
Document. as Usual, still the same as when we use dll, not much information provided by Epicor.
ex, when i call GetNewJobHead, i pass {ds: {Company: companyname}}, the return class contains two records in the JobHead, JobHead[0] and JobHead[1]. why? so, based on Jonathan’s suggustion, I pass {ds:[]} and the return class is ok I got only one record in JobHead, which is the correct one. so you want to keep trying until get correct. there is no document to say what input parameter should be.
This is a great example of why Epicor Functions are the path forward versus consuming the raw API itself. Why not make life easy on yourself and expose simple Epicor Function endpoints to then orchestrate the complex stuff on the Epicor side?