SWEAlert Method for an Application

The SWEAlert method displays a modal dialog box that includes a message. This method does not return any information.

Format

the Application().SWEAlert(message)

Usage

Use the SWEAlert method instead of alert. Note the following:

  • If you use the SWEAlert method, then Siebel CRM does not send the parent applet to the background.

  • If you use alert, then Siebel CRM sends pop-up applets to the background. MVGs and pick applets are examples of pop-up applets. If a browser event sends a JavaScript alert, then Siebel CRM hides the pop-up applet.

Used With

Browser Script

Examples

The following Browser Script example displays a status message:

function BusComp_PreSetFieldValue (fieldName, value) {

   if (fieldName == "Account Status") {
      var cVolume = this.GetFieldValue("Current Volume");
      if ((value == "Inactive") && (cVolume > 0)) {
         theApplication().SWEAlert("Unable to inactivate an account that has a
         current volume greater than 0");

         return ("CancelOperation");
      }
      else
         return ("ContinueOperation");
   }
   else
      return ("ContinueOperation");
}