sc_error_message("Text")

This macro generates an error message or error messages.

In "Form and Control" applications, the messages are presented together with other error messages found in the application, except when using the "sc_error_exit" macro.

In "Grid and Menu" applications the messages only will be presented through the "sc_error_exit" macro.


Ex. 1:
if ({discount} > 0.10 && [glo_usr] == 'operator')
{
sc_error_message("Discounting of " . {discount} . " above of the allowed one");
}

In this example, if the value in the discount field is over 0.10 and the user try to add or save this record, the operation is finished and the error message is presented. The command must finish with ");" (close parentheses and semicolon) used as a delimiter for the macro interpreter.