- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 01:29 AM
We have a requirement to sent email to requester's manager for certain tasks.
We have created a scheduled job for this.
How we can pass user name, manager name, manager email address via scheduled job using gs.eventQueue() to the notification.
We have to send notification to requeter's manager and in notification we have to put requester's name and manager name.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 01:35 AM - edited 05-03-2023 01:38 AM
Hi,
You can pass it as one of the 2 parameters
gs.eventQueue('<Event Name>', <object of record like Current or Glide Object>, <Param 1>, <Param 2>);
In param one or param 2 you can pass the manager like current.caller_id.manager & in your notification you will have to check the box 'send to param 1' and 'send to param 2' in the who will receive tab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 01:35 AM - edited 05-03-2023 01:38 AM
Hi,
You can pass it as one of the 2 parameters
gs.eventQueue('<Event Name>', <object of record like Current or Glide Object>, <Param 1>, <Param 2>);
In param one or param 2 you can pass the manager like current.caller_id.manager & in your notification you will have to check the box 'send to param 1' and 'send to param 2' in the who will receive tab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 02:01 AM
Hi Anurag,
Thanks for your response. I have tried following syntax
gs.eventQueue("user_manager_notification",gr,gr.u_caller_id,gr.u_caller_id.manager);
on trying this as background script it is giving me undefined for both gr.u_caller_id and gr.u_caller_id.manager.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 02:06 AM
Are you sure if you have the right field name? u_caller_id
Double check the field na,e and print the gr.u_caller_id & gr.u_caller_id.manager in your background script, once you get this value your emails will also work.
since u_caller_id is a custom field i hope it is a reference to user table.
The oob field on incident is caller_id hope you didn't add u_ by mistake.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 02:50 AM
Thank you Anurag.
This syntax is working fine now
gs.eventQueue("user_manager_notification",gr,gr.u_client_id.manager.getDisplayValue(),gr.u_client_id.manager.email);
It is giving me manager name and manager email address.
Can you help me how to put requester's name and manager's name in the notification body.