Approvers related list - Approving field does not populate

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-02-2023 02:49 PM - edited ā03-02-2023 02:51 PM
Hello Community,
Approvers [sysapproval_approver] related list - Approving [document_id] field does not populate when manually adding approvers to the list (when sys_created_by is not system). See screenshot. The approving [document_id] field autopopulates when an approver is added by workflow. Does anyone know why the field doesn't populate in this scenario?
Approving | A document_id reference field to the record being approved, on any table. |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-02-2023 04:09 PM
Hi,
I believe that's out of box behavior. The "Approval for" is technically filled, you can access the record and see it, but yea, I see that the Approving field is not filled when manually adding approvals. There's been previous discussion on this and there is a suggested workaround of adding a business rule to fill in that and other fields. See here: https://www.servicenow.com/community/developer-forum/approving-field-is-empty/m-p/1912245/page/3
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-03-2023 01:58 PM
Hi,
Thanks for marking my reply as Helpful and I know that's not what you wanted to hear, haha, but if there's anything else, please let us know?
If my reply helped guide you towards a solution or explained things that are a solution, please mark my reply as "Accept Solution".
Thanks and take care! š
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-07-2023 09:44 AM
Hi Allen,
I have 20 versions of the business rule now. I am trying to get the Approving field populated when manually adding an Approver on HR Cases only. This is where I am now.
nothing on the actions tab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-07-2023 11:33 AM - edited ā03-07-2023 11:34 AM
Hi @Suzanne H
You also have to set the table name as well before you can set the approval for (document_id).
This script is what you'd want to use:
if (current.sysapproval.sys_class_name == 'sc_req_item') {
current.source_table = current.sysapproval.sys_class_name;
current.document_id = current.sysapproval;
}
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!