- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 09:30 AM
Hi Team,
Need help!
There is a notification on table sc_req_item, whose
When to send: Record Inserted or Updated (Inserted-True)
Condition: Item.Name is <Name of cat Item>
And- Variables <Name of cat item> <name of variable> is <True>
I want to send this notification email to a variable of this cat item.
Variable (value): head_of_dept_name (Type-Reference (sys_user table))
I am unable to do dot walk into this variable of cat item from 'who will receive' > 'Users/Groups in fields' as I want to send this notification to the variable head_of_dept_name.
Please help!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2023 12:09 PM
Hi @rishabh31 ,
You can send that 'head_of_dept_name' field as a parameter via events and then in who will recieve section, select the checkbox 'event param1 contains recepient' or 'event param2 contains recepient'.
Please follow the below steps:
Step1: Create a new event by registering it in the event registry module
You can name it according to your choice
Step 2 : Create a new business rule on 'sc_req_item' table which runs before insert/update, select the 'advanced' checkbox
(function executeRule(current, previous /*null when async*/) {
gs.eventQueue('ritm.creation.notification',current,current.variables.head_of_dept_name,gs.getUserName());
})(current, previous);
Step 3 : Open your notification record and click on 'advance view' ui action link, under when to send section
select 'send when' as 'event is fired' and select the event name that you created above
Step 4: under who will recieve section, select the 'Event param1 contains recepient'
This can be achieved via flows as well without the need of creating events.
If my answer has helped with your question, please mark it as correct and helpful
Thanks,
Karan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 12:51 AM
Thank you @Karan Chhabra6 for the detailed solution. Its working as expected🙂