If Current logged in user's manager is VIP, show alert message "Manager is VIP "

Prasad Kumar
Tera Contributor

If the Current logged in user's manager is VIP, show the alert message "manager is VIP"
How can I configure that
thanks in advance
@James Chun

@Sumanth16

@Mark Manders

@Community Alums

@ Sohail Khilji

6 REPLIES 6

I think what you need is the a style on manager field same as it is on caller field on incident, if the manager is vip then highlight it

use field styles to do the same, you can take example form caller field on incident

AnuragTripathi_0-1710340120759.png

 

-Anurag

Sumanth16
Kilo Patron

Hi @Prasad Kumar ,

 

Please create display business rule and onload client script:

 

Display Business rule script :

 

(function executeRule(current, previous /*null when async*/) {
  // Populate scratchpad with VIP status
  g_scratchpad.requestorIsVIP = current.requested_for.manager.vip;
})(current, previous);

 

 

Client script :

 

 

(function onLoad() {
  // Use the scratchpad value to determine VIP status
  if (g_scratchpad.requestorIsVIP) {
    // Display your message here if the user is a VIP
    var message = "Your custom message for VIP users.";
    alert(message)
  }
})();

 

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda