Send email once record producer is submitted?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2021 07:27 AM
Hi All,
I have created a record producer to allow users to submit a change request.
What I am wondering is how can I send an email to a specific group once the record producer has been submitted? Along with the change details.
Can this simply be done in the 'Generated record date' script by using an event and link it to a notification?
Any guidance/assistance would be much appreciated.
Thanks!
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 09:11 AM
My understanding from my earlier findings is that the Item Produced Records table only stores a Record Value key for Task based table records (Task table and any tables extended from Task such as Inc, Prb, Chg, etc).
Our use case involved a non-Task based table, so the record key value was unavailable, hence our solution of generating the notification event as the last line on the RP script.
My guess is with the scoped app, since your tables are not extended from Global scoped Task table, it’s behaving the same way, unless you develop something to write your scoped records into that table. The global configuration for populating that table also isn’t aware of custom scoped tables and fields, so I would not expect it to populate…assuming I understood your question correctly.
Try creating your notification event on the last line of your record producer script and see if that works for you. You want to pass in current values as your parameters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2021 08:04 AM
Hi Alex, you could create a notification triggered when a record matching your conditions (e.g. Producer is your producer) is inserted into the Item Produced Record [sc_item_produced_record] table. You'll be able to dot-walk into the change from there, but the Task field is a reference to the task table, so in the UI you will only have access to fields on the task table. You can use mail script(s) to work around that.
Alternatively, you could create a notification triggered when a record matching your condition(s) is inserted into the change table. This will give you access to all of the change details, but you'll want to consider that--depending on your conditions--it may be possible to trigger the notification if a record is created in that table but not from the record producer, so you'll want to employ Ankur's solution if you need to prevent that.
Finally, you could register an event, generate that event in the record producer script (see Create an event), and create a notification triggered when that event is fired. In this design, consider the tips in ccajohnson's reply and be sure you're passing the change record to the event (otherwise you won't have access to the change details).