- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 03:33 AM
When we create Change records we need to add individual approvers. After the user creates the change they to the Approvers Related List, click Edit..., adds the user(s) and Saves. This creates an approval record linked to the change. However, I've noticed the source_table field doesn't get populated. In turn, this means email notifications aren't being triggered because the conditions rely on the source_table field being populated.
How can I ensure the source_table field is populated whenever an Approval record is created? This needs to work not just for change_requests but also other tables as well.
With my limited scripting knowledge I feel like this should be a simple glideRecord lookup based on the parent record (which I believe is recorded in the sysapproval field), however I wouldn't know where to begin if creating the script.
Any help is always appreciated
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 03:41 AM
HI,
Following is the business rule you are asking for.
When to run: before
Insert: true
Script:
current.source_table = current.sysapproval.sys_class_name;
current.document_id = current.sysapproval.sys_id;
Please visit the link for more details
Document_id:source_table is not getting populated for Release approval request record

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 03:41 AM
HI,
Following is the business rule you are asking for.
When to run: before
Insert: true
Script:
current.source_table = current.sysapproval.sys_class_name;
current.document_id = current.sysapproval.sys_id;
Please visit the link for more details
Document_id:source_table is not getting populated for Release approval request record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 04:24 AM
Great, thanks Aakash, that worked perfectly!