how to display simple alert pop up mesage with ok button on record producer.

Shilpi Sharma2
Tera Contributor

HI all,

I want to display a pop up message with ok  button if any feedback is pending while raising new incident. Please help

11 REPLIES 11

On clicking Ok i need to move to Create the incident Record , how to do that?

Indrajit
Mega Guru

Hey Shilpi,

You can pop up message with "OK" button in following ways

Alert Box:

When an alert box pops up, the user will have to click “OK” to proceed.

function onChange(control, oldValue, newValue, isLoading) {
    if (!isLoading)
    alert('You changed priority from ' + oldValue + ' to ' + newValue);
}

Confirm Box:

function onSubmit() {
   var priority = g_form.getValue('priority');
   if (priority == 1)
      return confirm('Submit a priority one ticket?');
}

Prompt Box:

function promptUser(){
   var con = prompt("This is really dangerous. \nType 'Continue' if you really want to perform this action.");
   if(con == 'Continue'){
      g_form.setValue('comments', 'Dangerous action performed.');
      gsftSubmit(gel('sysverb_update_and_stay'));
      //gsftSubmit(gel('sysverb_update'));
   }
   else{
      return false;
   }
}

Please Mark Correct and Helpful if it useful.

Regards,

Indrajit.