Show AddINFO message "Caller and Assigned to are same" if caller and assigned to users are same.

Neelu Shaik
Tera Contributor
Spoiler
Spoiler

Show AddINFO message "Caller and Assigned to are same" if caller and assigned to users are same.

4 REPLIES 4

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Neelu Shaik ,

Write BR as below :-

GunjanKiratkar_0-1669888684032.png

 

GunjanKiratkar_1-1669888699164.png

 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Thanks for the response.

Can we write it using client script?

Yes.

As below

GunjanKiratkar_0-1669889746644.png

 

 

 

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

   //Type appropriate comment here, and begin script below
	if(g_form.getValue('caller_id')==g_form.getValue('assigned_to')){
		g_form.addInfoMessage("Caller and assigned to are same");
	}
   
}

 

 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Binnu
Tera Contributor
    var emp = g_form.getValue('u_employee');
    if (emp == g_form.getValue('u_assigned_to'))
    {
        g_form.clearMessages();
        g_form.addInfoMessage('emp & assigned to are same');
    } else {
        g_form.clearMessages();
        g_form.addErrorMessage('emp & assigned to are not same');
    }