Notifications

126 views

Description

The HR application has custom Approve and Reject UI actions for the sysapproval_approver form. These UI actions check whether the record being approved is an HR Case to determine whether to display or not.

This check may be utilizing a GlideRecord lookups against the HR Case table instead of a class name check (triggering HR "Restrict Query" business rule processing, even for non-HR approvals). 

This can result in slow page load for the approval form when there are lots of approval records or tasks in the system.

Steps to Reproduce

 

  1. As admin, add a log statement to the HR Case "Restrict Query" business rule script.
  2. Log in as a user with no HR roles who has a requested Approval record for a non-HR record (such as Change Request).
  3. As the non-HR User, load the sysapproval_approver form for the non-HR approval.
  4. Inspect the system logs and see that the added message appears several times.

Workaround

Navigate to the Approve (sys_id = 3062e5f7c3012200b599b4ad81d3ae1c) and Reject (sys_id = 1a34ded1c3112200b599b4ad81d3aeb4) UI Actions and change the following replacement in the condition: 

Remove:

new GlideRecord('sn_hr_core_case')).get(current.sysapproval+'')

Replace with:
 
        sn_hr_core.hr.TABLE_CASE_EXTENSIONS.toString().indexOf(current.sysapproval.sys_class_name) >= 0

Related Problem: PRB1292852

Seen In

There is no data to report.

Intended Fix Version

Madrid

Fixed In

Jakarta Patch 10
Kingston Patch 8
London Patch 1

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-08-31 11:15:48
Published:2018-08-31