"Scheduled Reports" to send an Email Notification to the Holder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 10:11 AM
Hi everyone, how are you?!
Could someone help me?
I am using "Scheduled Reports" to send an Email Notification
When the Assigned Group field is Empty or Active it is False (print_1).
An email will be sent to the Group Holder u_business_partner_department (print_2)
however, this field is a reference field and within it is the table "cmn_department"(print_3)
which has the user name "Holder", which in turn this Holder field is a field
reference which will contain the email (print_4)
"Scheduled Reports" itself sends the email, but I need to create a Script (Conditional), within the
Schedule, because I can't include a single email in the script, so I thought of it this way (print_5):
if (u_business_partner_department.dept_head.email != '') {
gs.info('email sent to the Group Holder');
}
using dot walking, as I need to get the value from the email field.
Thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 11:17 AM
Hi, unfortunately your configuration and requirement are not clear from your post and your screenshots do not provide any clear context that relates these to your structure.
Based on details provided, I suspect you would want targeted individual notifications to each Group holder? If yes then perhaps run a scheduled job against your business application table, looking up all records that are missing assignment group, and creating a unique list of 'Group Holder' records. For each of these 'users' you would then trigger a sysevent which would be consumed by a notification, so 1 notification to each Group holder.
Depending on requirement of your notification message content, the impacted records 'display values' could be passed into your notification as one of the event parameters and then added to the notification message body. Or you could pass in sys_id's of impacted records (per group head) and use a notification email script to loop through the results, lookup the source records and produce a dynamic\pretty list or html table in your notification body.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 11:22 AM
Hi @Tony Chatfield1 how are you?!
Basically it would be this: When the "Customer Department" fields and the "Technical Responsible Department" fields are empty, it is to send a notification via email to the Holder of the "Business Partner Department" field (print_6), however this field is a reference field, due to That's it, I tried to do a dot walk to get Holder's email, but it's not working.
if (u_business_partner_department.dept_head.email != '') {
gs.info('email sent to the Group Holder');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 01:26 PM
Hi, if the field is a reference IE 1 to 1 relationship, then you should be able to dot walk to fields within the reference record, or fields within the reference records, reference records. This should be possible via the Notifications 'Select variables' picker, or by dot.walking in any script.
Are there any ACL's preventing access\visibility of the related record(s)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 03:23 AM
Exactly, the "Business Partner Department" field is a reference field that I need
do dot walk to reach the Holder's email which is in the "sys_user" table, so that the Holder
receive a notification email.
if (u_business_partner_department.dept_head.email != '') {
gs.info('email sent to the Group Holder');
}
Do you have a script suggestion or any documents? since mine isn't working.
Tks