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-08-2023 09:09 AM
Hi Allen,
I appreciate your effort but the above script isn't working either. I copied and pasted your script, I only changed the sys_class_name to sn_hr_core_case. I tried it with and without the condition. The Source Table and Approving fields are still empty when manually adding approvers to the related list.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-08-2023 09:49 AM - edited ā03-08-2023 11:09 AM
Hi,
I've tested what I've provided, so I know it works, but I think you may not be working with the table you've changed it to in the script. Are you sure you're selecting the right HR table? And this isn't a total rewards case, etc.? sn_hr_core_case_total_rewards?
There are many, many tables involved with HR and you'd want to check the URL of the case you're viewing to see the table involved and then adjust the business rule as appropriate.
Example:
Please keep in mind that my assistance is in hopes of guiding you and may not give you the exact answer. You may need to adjust things, etc. to your use cases. You may need to add multiple OR statements to evaluate more tables in that if statement or approach it from a different perspective and remove the if statement entirely?
I feel confident that it works even if you wanted to remove that if statement (and the ending bracket after the script } ) to validate š
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-08-2023 12:31 PM
Yes, I'm sure about the table and I've actually tried a couple others as well. Thanks for the suggestions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-08-2023 12:43 PM - edited ā03-08-2023 12:44 PM
Hi,
Well, my apologies, but I don't know what else to do here because I know it works, as I'm using it myself. Something must not be set right with your business rule conditions, script, or something else as it works for me. I suggest you try a brand new test record, remove any conditions, and only leave the if statement (technically, I'd recommend removing that too and doing a test run with just the script).
Example:
Screenshot BEFORE I manually add an approval (this show one current one empty from it not working before, as in the issue we're talking about):
Now, I'll go to edit and manually add one:
And a screenshot of it working for Alex Linde with the "Approving" field filled in, etc.
Not much else I can do, as it works...
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-06-2023 02:05 PM
Thanks for finding that other post with a solution. I tried it and it's not working, let me know if you are aware of any other options.
Thanks