RaiseError()
A while ago I discovered the function RaiseError() in Siebel. To be honest, a colleague said that I could use that function in stead of RaiseErrorText().
Since we are implementing a multi-lingual application, all error messages should be multi-lingual. So whenever we wanted to throw an error message in eScript, we used the following code combining RaiseErrorText and LookupMessage in order to throw the error in the correct language.
TheApplication().RaiseErrorText(TheApplication().LookupMessage(”User Defined Errors”, “X_DISPATCH_REQUIRED_FIELDS”));
As you can see, this requires a lot of typing and this was also the opinion of a colleague. He then suggested me to use the RaiseError function instead. This is actually the same, but you just have to pass the name of the error you want to throw as an argument.
TheApplication().RaiseError(”X_BARCODE_NOT_NUMERIC”);
Off course you have to create the error message first in Tools in Message Category -> User Defined Errors and not in User Defined Strings as I tried.
The RaiseError function saves you time on typing code, so be sure to use it next time you want to throw an error in you script when running a multi lingual application.
Comments (0) 260 views



Posts