I have a scenario where I need to programmatically invoke the delete action on AR Documents in specific scenarios. however, I am not finding the correct action to invoke in the api.
I have verified this AR Document exists, is in status ‘Balanced’, and the Delete action is available from the UI.
POST <host>/Payment/Delete
BODY {
"entity": {
"ReferenceNbr": {
"value": "<refNum>"
}
}
}
RETURNS 204: No Content
What am I missing?
Solved
How to invoke AR Document (AR Payment) Delete via api Action
Best answer by Dmitrii Naumov
You need to provide the payment ID in the URL
Try replacing the Delete part of the URL by the ID
entity/.../20.200.001/Payment/Delete
It should look like that:
entity/.../20.200.001/Payment/e734ff7e-fadb-ea11-8177-c9aeb77cfe99
Alternatively you can use the Key field (doc type and ref nbr)
entity/.../20.200.001/Payment/Payment/068371
You also do not need body at all here.
Here is the help article on the topic:
https://help.acumatica.com/(W(2))/Help?ScreenId=ShowWiki&pageid=04825ddc-c3af-49de-8663-ae119e84b987
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
