Abort pwo in Assigned Orderstate

Hi community

I desperately need to ABORT (no CancelOrder) some pwos in any reasonable state (“Assigned”,”OrderProduct”, etc..)  from a custom script. If I try CallMethod(“Abort”…) I got an error message like “this method can only be called internally”, but I need that so much.

Please, advice.

Thanks in advance

a

  • ABORT is done for internal technical reasons and thus can not be done in a user, even admin, context.

    You should be able to run your script as a process from a jobserver. Jobserver processes run in an internal service acocunt context and should be able to call the method.

    Not recommended but possible: you can set the "Service Account" flag on the systemuser you authenticate with. That should put you also in an internal context. I advise you to be very careful with this and revert as soon as possible. Otherwise large parts of the normal objectlayer functionality might be bypassed.

    For one-time cleanup operations you might also check out the SQL stored procedure "exec QBM_PJobCreate_HOCallMethod_L " which basicly creates ad-hoc jobs for the job server to process. Again be careful and know what you do.

  • Hi Klaus, thanks for your help. I did solve just setting the ValidUntil to some back date, then cancelling the order. It seems it worked, maybe it takes a while, but it's ok.

    Thank you again

    a