- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2016 09:26 AM
Hi,
I need some help with a catalog client script. I have a u_requested_for field that references the sys_user table. If the user that's entered in that field has a job title of "Physician", I would like an alert to show. The job title field name (u_title) on the sys_user table is referencing the u_job_codes table.
Here's the info on the job title field:
Below is my catalog client script that's not working.
I think the issue is on line 6. I've tried var job = requester.u_job as well, and that doesn't work either. Please help.
Thanks,
Maria
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2016 02:22 PM
Thanks balsu333. This worked for me.
Here's my updated script:
function onChange(control, oldValue, newValue, isLoading){
var user = g_form.getReference('u_requested_for', doAlert);
}
function doAlert(user){
if(user.u_job == '8d7168dc0f63a900f94f46ace1050ebe'){
alert('Hospital Staff Physicians requesting Epic or Webmail remote access must contact the Physician Support Line at (866) 405-3742.');
var URL = "navpage.do";
top.window.location = URL;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2016 02:24 PM
Good to hear its working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2016 10:11 AM
Even I prefer doing GlideAjax suggested by ghsrikanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2016 11:32 AM
Hi Maria,
I the script you have written,Change the line 7 as
if(job =='sys_id of the job from u_job_codes table')
Thanks,
Mihir