Create a Stored Procedure Success Message

When setting up a custom button that triggers a stored procedure, you can set up the stored procedure to return a success or failure message without raising an exception from the stored procedure, triggering a stack trace error.

Note: This is only an outline of the process. These steps do not give a detailed description and assume that you know how to write stored procedures and launch them using a custom button.
  1. Add a parameter to a stored procedure named @ReturnMessage that is an output parameter.
  2. Code the stored procedure to set the return message. If the message should not display, set it up as an empty string.
  3. Code the stored procedure to return an integer to determine whether the message is a success message (0) or failure message (any number greater than 0).
  4. When setting up the custom button in the VA Custom Form Buttons Form, add the return message parameter to the Parameters tab.