08-04-2017 10:28 PM - edited 02-04-2024 12:44 AM
Hello, I am trying to cancel an invoice using the "Service Layer", I am guided by the example found in the "API Reference".
Https://hanab1:50000/b1s/v1/Invoices(410)/Cancel
The message that shows me is: The requested action is not supported for this object.
I am using the Postman application to perform the process, a cancellation to a sales order works for me, but the invoice does not.
regards
Hello, Jesus.
As promissed here is the current status on this matter.
This is an issue with Service Layer, scheduled to be fixed on the next patch level (9.2 PL09). Be advised that the timeframe is subject to change without notice.
Thank you for bringing that up.
UPDATE 06/12/2017 - The fix was delivered in the 9.2 PL10
and find in the session "References" the note #2497424 which address this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Roman, you are right.
The fix was postponed and delivered in the PL10 (released last 04.12.2017).
You can see the details in the PL10 Release Note and find in the session "References" the note #2497424 which address this issue.
Hi ralph ,
Thank you for updating on the service layer fix. Currently we tried cancel for Invoice and Credit Memo and via Service Layer and it is working well. Unfortunately when we tried cancelling Delivery in 9.2 PL 10 it will have an error "The requested action is not supported for this object".
Sample Call : https://IP:50000/b1s/v1/DeliveryNotes(137)/Cancel
Result :
{
"error" : {
"code" : -5006,
"message" : {
"lang" : "en-us",
"value" : "The requested action is not supported for this object."
}
}
}
Regards,
Marc
Hi Jesus,
Is not possible to perform the cancel of an Invoice in SAP Business One, the concept is create a cancellation document. On DI API to perform this action you do something like this:
Documents oDoc = oCompany.GetBusinessObject(BoObjectTypes.oPurchaseInvoices);
if (oDoc.GetByKey(docEntry))
{
//create cancellation document
Documents oDoc2 = oDoc.CreateCancellationDocument();
if (oDoc2.Add() != 0)
{
throw new Exception("Something Wrong");
}
}
Maybe you can try to looking for a similar method on Service Layer.
Hope it helps.
Kind Regards,
Diego Lother
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
9 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.