The CreatorCon Call for Content is officially open! Get started here.

E-mail not being sent to the user based on user ID

Juan Pablo Vas1
Tera Contributor

Hi team,

I built a scoped app on our Rome instance and the tables are not extended from the task table.

The "created by" field on the core table is a string field like in any other table and populates with the user id of the user creating the record, in this case the IDs are firstname.lastname

I have a couple of notifications that get triggered in different scenarios of that core table.

The recipient is the "created by" of the core table and the "send to event created" is true (ticked)

However, the e-mails only go out when the user ID is an e-mail format, e.g. jp@hello.com  

But the e-mails are not sent if the ID is not an e-mail format like firstname.lastname

 

Any ideas?

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

Hi, if you are utilizing the OOB 'sys_created_by' field then this is a string field that is not mapped to sys_user record and I believe that the behavior you see is correct and expected.
Note; it is normally the sys_users related 'cmn_notif_device' records that the system sources email address from and without a sys_user record for reference this is not possible.

A couple of solutions

  1. Add a 'sys_user' reference field to your table and populated this during record insert so that the creators user record  can be used as a recipient in your notification(s).
  2. Update your app so that your notifications are triggered by sysevents and in your script(s)/triggering BR's set the recipient(s) as an event parameter, which can then be consumed in your notification.

I would recommend 1, as it will provide more options for future use IE data filtering, reporting etc.

View solution in original post

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, if you are utilizing the OOB 'sys_created_by' field then this is a string field that is not mapped to sys_user record and I believe that the behavior you see is correct and expected.
Note; it is normally the sys_users related 'cmn_notif_device' records that the system sources email address from and without a sys_user record for reference this is not possible.

A couple of solutions

  1. Add a 'sys_user' reference field to your table and populated this during record insert so that the creators user record  can be used as a recipient in your notification(s).
  2. Update your app so that your notifications are triggered by sysevents and in your script(s)/triggering BR's set the recipient(s) as an event parameter, which can then be consumed in your notification.

I would recommend 1, as it will provide more options for future use IE data filtering, reporting etc.

I captured the current user sysID using gs.getUserID() via the script of my record producer into a new reference field to sys_user. now I can use that to trigger the notification and it works every time.

Juan Pablo Vas1
Tera Contributor

Cool, that's good guidance, let me try that, cheers!