For all inspection service calls (GET method) I’m getting the following exception:
{"HttpStatus":500,"ReasonPhrase":"REST Api Exception","ErrorMessage":"Parameter count mismatch.","ErrorType":"System.Reflection.TargetParameterCountException"}
For all inspection service calls (GET method) I’m getting the following exception:
{"HttpStatus":500,"ReasonPhrase":"REST Api Exception","ErrorMessage":"Parameter count mismatch.","ErrorType":"System.Reflection.TargetParameterCountException"}
On the Swagger page, what are you providing in the Input parameters? It’s a fairly complicated one.
There is no parameter required, it is supposed to return all entities. but I can set $select, $filter, $orderby, $top and $skip. I have tried setting $top to 1 which I’ve got the same results.
As do I. So I changed to the Custom methods instead of OData to see if I could do a GetRows and that’s where I see the complex input parameters. Since receipts are a “subset” of Inspection Processing, I wonder if we need to make another call first.
Hey Amin,
To clarify, you are able to use the GetRows method with a specific whereClauseInspProcList value to return the appropriate data via the Swagger UI page, however you are unable to return the data correctly using the same endpoint and same payload via your c# calling application?
I don’t know must about your EpicorRestAPI object, but that looks like it’s using linq over the dataset to retrieve the record, but I’m not 100% sure that is the same as calling the API method like you did in Swagger. It’s unfortunately a little too abstracted for me to be able to speak to it, but that’s definitely something to look into
The real question is what you’re doing in the c# app. Which call is your EpicorRestApi object actually making behind the scenes?
Try it with a regular http client first to work out the plumbing
Oh I see what you’re saying. I am getting the 500 with the OData call in postman/swagger too, however the GetRows service does work fine. OData call is supposed to implement GetRows, but I too am unable to see that working. Is there a reason you need to use the OData Methods?
We are doing integration with a part traceability application that is going to be used in our receiving stations, that’s the reason why we are using C#/TypeScript to call Inspection Processing APIs. Using custom method I could retrieve inspection pending materials in C#.
Right now I’m having trouble with calling “InspectReceipt” custom method. before calling the method, I’m calling the following methods (1-3) in order (following the Epicor’s trace log):
“AssignInspectorReceipt” (executes OK)
“OnChangePassedQty” (executes OK)
“OnChangeFailedQty” (executes OK)
“InspectReceipt” (Returns with “Object reference not set to an instance of an object” exception)
Here is the exception received from Epicor’s backend as the result of calling custom method in step 4:
{"HttpStatus":500,"ReasonPhrase":"REST Api Exception","ErrorMessage":"Object reference not set to an instance of an object.","ErrorType":"System.NullReferenceException"}