Approvers related list - Approving field does not populate

Suzanne H
Giga Guru

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?

SuzanneH_1-1677797056506.png

ApprovingA document_id reference field to the record being approved, on any table.

 

11 REPLIES 11

Allen Andreas
Administrator
Administrator

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!

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!

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.

SuzanneH_1-1678211046317.png

nothing on the actions tab

SuzanneH_0-1678210941320.png

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!