Is it possible to store the concatenated email add...
# general
l
Is it possible to store the concatenated email addresses of users with Role X in a transaction body field? I wanted to send the approval emails to to all of them with that role.
n
Luis i will send you some details with what someone sent to me recently as i think it could possibly be adapted to work for you
m
Luis. You can create a group and use a saved search for members of a certain role. Then your approvals can be set to that group. A group is great because it’s dynamic from a search so if you get new employees with that role they will be added to it.
s
@Michael McNamara you are right about group - it can be dynamic but for the email group can can have only one email ie distribution list. In this case use a workflow and saved search combination to send email to individual users with the specific role.
m
Are you sure? I see the ability to add a group instead of individual users. I’ve used it before. It’s just that he won’t need a custom field on a transaction. He would use a group on the email itself.
In this case, a saved search that emails out to that group when the conditions are met.
s
m
That’s optional (Optional) If this group shares an email alias, enter the email address in the Email field.
Email field is not required. That’s only if they have a group email created on their mail server.
s
yup saved search is easiest one to use for this. Note that there is few enhancement request filed for expanding group's capabilities.
l
I already explored the DYNAMIC group before but it didn't work if the Email field was blank. I need the emails to be send to the individual users. The dynamic group without email does not appear as an option in the recipient field of the Send Email action in a workflow.
I should have made it clear that I will be using the email addresses in a Send Email action of a workflow. So a saved search won't work either
s
Use saved search to send the email using update as the trigger
l
What I ended up doing was creating a custom record that stores the role, concatenated list of email addressses (populated by a summary saved search and not stored), and concatenated list of email addresses (STORED and populated by a scheduled workflow). Then, I have a custom transaction body field called Next Approver's Role which is sourced from the custom record list. In my Send Email action, I sourced the recipients from the custom record's concatenated email addresses (STORED). I tried using the NON-STORED one but the workflow does not seem to pick up the values unless the field is stored.
@Sam-I-Am ohh that sounds simpler. But I don't quite understand how to set that up to be honest
On the Send Email action, I don't see where I can add a saved search to define the recipients
m
Saved search is so much simpler. Create a transaction search to your preferences and date range. There is an email tab. Use that to set up your email template and if the search send for each record or scheduled as a group. On the email recipient section, you just click the little arrows to open it up, filter for groups and use that group as your recipients. They should all have an email address under their employee record. That’s it.
l
I think the email sending has to be in the workflow itself. It is being used in an approval workflow. Those users with that role are the approvers. Or at least it is easier to manage if the entire approval process logic is defined in the WF itself