Where I work we have been using the REST API quite a lot to automate redundant tasks in Acumatica and tie some of our in house software in to it. However, I do not have a lot of experience using “Actions” aside from the “Release” button and so have come to you for help.
Objective:
Add a PO Receipt to an existing Bill.
The Bill has already been created and is on “Hold”. I have added the “AddPOReceipt” action to my extended web service endpoint. When I POST to “AddPOReceipt” endpoint I get a 204 response to which I follow up with a GET to check the status of the request and I get a 200 response. When I look at the bill there is no receipt added to it though. What am I doing wrong?
It is also available in the default endpoint, so you don’t even need to create a custom one.
Hey dnaumov,
I should have mentioned that we did initially start with what you are suggesting but were unable to make it fully work. All of the information would get entered into the Bill except for the Purchase Order number and the Receipt number on the detail line item.
exceptionMessage:'Purchase order RO - 211127 not found.'
We are not sure why we get the message but we believe it is because the Purchase Order has a status of Complete. We cannot add the PO and Receipt numbers in manually through the UI either. However, when we use the “Add PO Receipt” button it works and links the Bill to the Receipt in the PO. So this is why we went down the path of trying to get the API to work with the AddPOReceipt button.
Honestly, I was not able to understand how that code creates Bill lines mapped to Purchase receipt lines.
I’d suggest to try example that I’ve provided above in Postman to see how it works and then try implementing that in your code.
Please also note that this method only works in default endpoint or endpoints derived from default.
Hey @dnaumov ,
Not a problem, we have managed to figure the problem out and it looks to be the endpoint version 17.200.001. After choosing version 18.200.001 our scripting seems to work.