Bookshelf Home | Contents | Index | Search | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Application Methods >
RaiseErrorText
The RaiseErrorText method raises a scripting error message to the browser. The error text is the specified literal string. The optional parameters are used to format the string if it contains any substitution parameters (%1, %2).
Syntax
TheApplication().RaiseErrorText(value, [param1], [param2],...., [paramN])
Parameter Description value param1, param2, ..., paramN Optional parameters used to format the error message if it contains any substitution parameters (%1, %2).Returns
Not applicable
Usage
When invoked, the RaiseErrorText method stops execution of the script.
Internally, the RaiseError/RaiseErrorText methods raise a Server Script exception. Therefore, if you have implemented error handling in your scripts, the error handling can suppress RaiseError/RaiseErrorText functionality. In the following eScript example, the RaiseErrorText results in a scripting execution being raised, transferring control to the catch statement. For the error message to be displayed, the error must be thrown using the throw statement.
function BusComp_PreDeleteRecord ()
{
try {
var status = this.GetFieldValue("Account Status");
if (status == "Gold") {
TheApplication().RaiseErrorText("Unable to delete Gold Account");
return (CancelOperation);}
else {
return (ContinueOperation);
}
}
catch (e) {
throw e;
}}
If you have implemented error handling in Siebel VB and are using "On Error Goto ...", the RaiseError and RaiseErrorText methods result in the script transferring execution to the error handler. "On Error Resume Next" suppresses the RaiseError and RaiseErrorText methods.
Used With
Server Script
Bookshelf Home | Contents | Index | Search | PDF |
Siebel Object Interfaces Reference Published: 18 June 2003 |