oScript.SetError Problem

I have a script assigned to the 'Pre-Delete' event of SO_SalesOrderDetail.  If certain conditions are met, I'm calling the below to cancel the deletion of the line and notify the user:

retVal = oScript.SetError("Line cancel reason required")

Upon attempting to delete a line in the above scenario and watching the Trace Window in debug mode, the SetError call appears to be executing (below) and the deletion of the line is canceled, but  I'm not getting a prompt to the user.  I've confirmed in another couple of events that when calling SetError I get a prompt, but for some reason I can't get it to appear in this event.  Anyone have any ideas what the problem might be?  Thanks in advance for any help.


SCRIPT/CallScript - VB Run Error:Line cancel reason requiredŠ

Parents
  • 0

    Since the SetError call does cancel the deletion, I'm displaying a message box as well to display the message.  I'd still like to get an idea of why it's not working though.  I've confirmed the problem in both Sage 100 Advanced 2016 and 2018 on the latest service pack.

Reply
  • 0

    Since the SetError call does cancel the deletion, I'm displaying a message box as well to display the message.  I'd still like to get an idea of why it's not working though.  I've confirmed the problem in both Sage 100 Advanced 2016 and 2018 on the latest service pack.

Children