- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 07:08 PM
Hi
I want to send out an email to notification all the members in the group when the group's manager is deactived.
I use client script to do the following action when the user record of the group manager is set to inactive.
1. set the group manager field to empty
2. delete the manager from the group member list
I want to greate an email, but which table should I use? Since I don't know how to set the value of who'll receive this email.
And could you also give some advice for create the event and business rule?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2017 10:41 PM
Hi All
To solve this requirement, I add the group members to CC list and write the code into Email script.
Hope this could help you if you have the same requirement with me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 08:08 PM
Hi,
I assume you are done with the client script part.
Now to send the notification :
You can create a notification on the Group[sys_user_group] table.
In the who will receive tab add the group.
Since the the group will be containing an email ID and the group members of that group will receive the email notification.
Somewhat like this.
When to send:
Who will receive :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 08:16 PM
Hi Shah,
Thank you for your reply.
I want to send email to the group members who are in that group which the manager has been deactived to tell them the manager is leave the company and need to set a new one.
So I think I should create an event and a business rule to do it. But I don't know where and how to set the receiver based on my requirement.
Could you give out the detail steps for it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 08:53 PM
First Create an Event from event registry
Create Business rule
Write this in the advanced tab
(function executeRule(current, previous /*null when async*/) {
// Add your code here
gs.eventQueue('manager.inactive',current,gs.getUserID(),gs.getUserName()); // to call the event
})(current, previous);
Finally the email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 10:11 PM
Thank you that's very useful for me.
But I still have question. How to send email to indiviual members to notifiy them the manager is inactive instead using the group email?