Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

HRSD

ash_1998
Tera Contributor

I have a requirement to hide "source contact type" fields choices like "email" and "phone" if hr services is open door submission . how to achieve this functionality

1 REPLY 1

Sandeep Rajput
Tera Patron

@ash_1998 Please create an onChange client script on HR Case (sn_hr_core_case) table as follows.

 

Screenshot 2024-03-08 at 11.00.49 AM.png

 

Here is the script.

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }	
   //Type appropriate comment here, and begin script below
   if(newValue=='8c1db1099f231200d9011977677fcf59'){//Replace sys_id with the sys_id of your Serivce
	g_form.removeOption('contact_type','email');
	g_form.removeOption('contact_type','phone');
   }
   
}

 

Note: On line number 6 replace the sys_id with the sys_id of your HR Service where you would email and phone contact types to be removed.

 

Hope this helps.