I’m using the AddToAPInvoices REST method to create an APInvoice. When creating the head item, it runs fine, but when I try to attach an APInvDtl collection, I’m unable to do so because it requires a DataServiceCollection rather than just an array or list of APInvDtl.
So I decided to try to add them in different steps, however, when doing so I’m getting this exception:
{"HttpStatus":400,"ReasonPhrase":"REST API Exception","ErrorMessage":"There is no UOM Selected.","ErrorType":"Ice.Common.BusinessObjectException","ErrorDetails":[{"Message":"There is no UOM Selected.","Type":"Error","Table":"APInvDtl","Program":"Epicor.RESTApi.Common.dll","Method":"ThrowUpdateExtException","ColumnNumber":17,"LineNumber":27}],"CorrelationId":"351d9aea-d649-440f-9da9-b325318f25a0"}
I’m not quite sure what property this references in an APInvDtl or where it even comes from. Can someone explain to me why this exception is being thrown, what it’s referencing and, if possible, how to add an APInvDtl collection to my APInvoice so I can do this all in one step rather than two?
{"HttpStatus":400,"ReasonPhrase":"REST API Exception","ErrorMessage":"Invalid Line Amount.","ErrorType":"Ice.Common.BusinessObjectException","ErrorDetails":[{"Message":"Invalid Line Amount.","Type":"Error","Table":"APInvDtl","Program":"Epicor.RESTApi.Common.dll","Method":"ThrowUpdateExtException","ColumnNumber":17,"LineNumber":27}],"CorrelationId":"2c1f461b-19d6-4762-9d5c-3aa3d79779cd"}
Another property that isn’t in the APInvDtl class.