I’m a Windows desktop application developer. I’ve been asked to look into the Epicor 10 REST API for integration with existing custom in-house applications.
I’ll be mostly working with the Erp.BO.PartSvc and Erp.BO.EngWorkBenchSvc services.
While testing things out with the Swagger tool, I noticed that the PartSvc.PartRevs “endpoint” (May not be the right naming, I’m still pretty green to all this) was not returning any data.
Also, no matter what I set as the $filter expression, the Response body’s value is always empty.
On the other hand, if I use other endpoints based on GetByID, and pass in the same parameters, then I get the expected values returned.
I get the same behavior with other endpoints such as PartSvc.PartRevAttches.
So my question is whether the PartSvc.PartRevs endpoint should actually return something, or not. My feeling is that there is something wrong with the customer’s setup.
Some of those sub tables behave quite funny. Have you tried using the PartRevSearch one instead see if you have better luck?
URL: api/v1/Erp.BO.PartRevSearchSvc/
Too bad there isn’t one directly on the PartRevAttches
I was discussing this with another “consultant”, and they’re telling me that the Swagger tool exposes methods/endpoints that are not really “supposed” to be there.
I brought up this question: How would you issue a query that would return all the PartRevAttches whose FileName ends in “.PDF”… They say I should get the Parts, then the PartRevs and then the PartRevAttches. I said “so much for efficiency”
An alternate strategy is to write a BAQ and use the BaqSvc. You can pass in the parameters and do all the linking and selection on the server. Bonus: less likely to break on upgrades and you would only have to fix the BAQ if it did break and not have to fix all of your programs.
As is often the case, “too many chefs ruin the sauce”. I have to abide by what the principal consultant in this project says. I’m sure I could convince the end user, but I choose my battles carefully
I guess if the principal is trying to book hours, using BAQs would not be the way to go - especially if they’re trying to guarantee some follow up revenue for upgrades, etc…
And speaking of one chef ruining the sauce, I just listened to an entertaining Ted Talk about Micromanagement. You all might find it entertaining too.
This will return the part number in Key1, revision in Key2, filepath in XFileRefXFileName, and file description in XFileRefXFileDesc. Unfortunately you can’t filter on something like *.pdf in the API call itself because the XFileRefXFileName field is not native to the attachment table (it’s extended from XFileRef). Depending on how many attachments exist for part revs, filtering the response application-side shouldn’t kill performance too badly if you trim down the data return to just what’s necessary.
Thanks, this is starting to put my concerns to “rest”. I see that there are actually a lot of Svc that I should look into when the “intuitive” one won’t do.
Good thing you explained about XFileRef, as I was already planning on going down that path