We have a job with multiple attachments linked to Op10 and we are trying to retrieve these suing the REST API
Looking at the XFileAttch table gives
This clearly shows 3 attachments to Assy 0, Op 10 of job GLH99999
First running https://ourserver/api/v1/Erp.BO.JobEntrySvc/JobOperAttches returns
Response Body
{
_ “odata.metadata”: “https://ourserver/api/v1/Erp.BO.JobEntrySvc/$metadata#Epicor.RestApi.JobOperAttches”,_
_ “value”: []_
}
Response Code
200
I would expect this to return all rows attached to Job Operations but nothing comes back.
Should I expect a return?
My Backup option is to build a BAQ looking at XFileAttch and query that.
As an FYI
I also tried GET /JobOperAttches({Company},{JobNum},{AssemblySeq},{OprSeq},{DrawingSeq}) method.
No matter what gets passed in as the DrawingSeq parameter, the method only returns the last item attached.
I ran
https://ourserver/api/v1/Erp.BO.JobEntrySvc/JobOperAttches(sistnz,glh99999,0,10,0)
and
https://ourserver/api/v1/Erp.BO.JobEntrySvc/JobOperAttches(sistnz,glh99999,0,10,10)
and got back
Response Body
{
“odata.metadata”: “https://ourserver/api/v1/Erp.BO.JobEntrySvc/$metadata#Epicor.RestApi.JobOperAttches/@Element”,
“Company”: “SISTNZ”,
“JobNum”: “GLH99999”,
“AssemblySeq”: 0,
“OprSeq”: 10,
“DrawingSeq”: 12290,
“XFileRefNum”: 6265,
“SysRevID”: “2343176519”,
“SysRowID”: “75fe4b11-40cd-46d8-b426-2c36700f8511”,
“ForeignSysRowID”: “043fdb97-3216-4afb-86e0-de1578905d5f”,
“DrawDesc”: “Cereal”,
“FileName”: “\\fileserver\Companies\SISTNZ\Attachments\SISTNZ\JobOper\4.2LCereal.mp4”,
“PDMDocID”: “”,
“DocTypeID”: “IMAGE”,
“RowMod”: “”
}
This being the last attachment added to the op and showing DrawingSeq 12290 which matches the Seq column ref in above image
Is this a bug?