Skip to main content

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

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


Thank you ​@dsj i’ll try it.


@dsj unfortunatly it didn’t work : 

 

We have chcecked, we do have value in company

 


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