Pop up messages when updating case "Comments" or "Closure Notes"

Scotty88
Tera Contributor

.

10 REPLIES 10

S

Akshay12Tejam
Tera Contributor

@Scotty88 

You have to create propery on sys_properties.list. Please see attached screenshot. Pass sysid of account in value and check in BR like below:

if(acc==gs.getproperty("accountsysysid"){

gs.addInfoMessage("add your message here");

}

C

Hi @Scotty88 ,

 

Writing an onChange client-side script for additional comments is not feasible because it will trigger an alert for every single letter typed, resulting in a poor user experience. I've attempted various methods, including GlideAjax, but none have yielded a satisfactory solution.

 

However, for resolution notes, it is feasible to implement an onChange client script. Please check below to see how I achieved this 

 

Script-

 

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
  if (isLoading || newValue === '') {
    return;
  }

  var acc = g_form.getDisplayBox('account').value.trim();
  
// Define the regular expression with anchors
  var pattern = /^Advanced Super Routing$/; // You can put your account name

  if (pattern.test(acc)) {
    alert('Comments has been updated');
  }
}

 

In the above script, I've used the "Advances Super Computing" account, as you suggested avoiding sys_ids. Please refer to the screenshot below for the onChange client script on Resolution Notes (Close Notes).

 

AstikThombare_1-1714471433929.png

 

 

The Final Outcome -

 

So whenever someone changes resolution notes and account is 'Advances Super Computing' it is populating alert at the top . check below screenshot -

 

 

AstikThombare_2-1714471470777.png

 

   If my reply helped with your issue please mark helpful 👍 and correct ✔️ if your issue is resolved.

 

                         By doing so you help other community members find resolved questions which may relate to an issue they're having

 

 

Thanks,

 

Astik

 

 

 

 

 

O