Skip to main content
Question

Cancel Customer ORder Invoice API Package

  • January 18, 2025
  • 4 replies
  • 79 views

Forum|alt.badge.img+10

We are trying to cancel customer order invoice that are  in a Preliminary status.

based on the trace file (cause we are able to do that manually) : 

The CancelDebitInvoice method is to be used.

 

We are able to cancel the invoice using rest api, but when trying to implement this in a migration job : 

we have the following error : 

Arguments used to execute current operation are not allowed.

 

 

 

Any Idea Please?

 

Thank you in advance

 

@kamnlk ​@dsj your help would be apretiated

4 replies

dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 866 replies
  • January 21, 2025

Hi ​@IFSRUNINNOVAL 

 

Projection methods are for the use of REST APIs and not to be used within server side coding or migration jobs (or sql event actions) since the projection is a kind of a wrapper for the server APIs. Instead of using the SVC package method, check for the implementation of the method you are trying to execute and use the server method.

 

Ex: CancelDebitInvoice method uses this server method for actual execution.

 Invoice_Customer_Order_API.Cancel_Prelim_Debit_Invoice(company_, identity_, invoice_id_, cancel_reason_);

 

Hope it helps!

Damith


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 121 replies
  • January 21, 2025

Thank you ​@dsj i’ll try it.


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 121 replies
  • February 7, 2025

@dsj unfortunatly it didn’t work : 

 

We have chcecked, we do have value in company

 


Forum|alt.badge.img+3
  • Do Gooder (Customer)
  • 22 replies
  • February 7, 2025

hi ​@IFSRUNINNOVAL 
 

  • Use the Correct API Method

    • Instead of CancelDebitInvoice, use Invoice_Customer_Order_API.Cancel_Prelim_Debit_Invoice.
    • Ensure all required parameters (company_, identity_, invoice_id_, cancel_reason_) are correctly set.
  • Check User Permissions

    • Verify that the user has the necessary execution rights for Invoice_Customer_Order_API.
    • Ensure proper role configurations in IFS security settings.
  • Validate Invoice Status

    • Confirm the invoice is in Preliminary Status before attempting cancellation.
    • Check for dependencies like linked payments or accounting rules.
  • Execution Context & Data Integrity

    • Ensure that the migration job runs with the correct execution permissions.
    • Validate that the IFS background job processor can execute the cancellation.
  • Enable Debugging & Logs

    • Use IFS SQL Trace and logging mechanisms to identify argument failures.
    • Run a manual test in PL/SQL before integrating into the migration job.

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings