This error like image below

So you can check:

  • Verify that put code in correct tab “On Complete”.
  • Another fields can be affected, so test with only one field to verify this code is still run.
    • If not, contact Epicor Support for help.