Usage of getMessage() without preloading message key.

Impact area

Performance

Severity

High

Affected element

Client Scripts

Rule ID

SN-0452

Impact

The message keys available in Messages field are loaded when the form loads. When these keys are used with the getMessage function no additional call to the server is needed. Conversely if the referenced key is not in the Messages field then a new request to the sys_ui_message table will be performed, which can impact the instance performance.

Remediation

Use the Messages field on the client script record to load the message key being used in getMessage() function


Time to fix

15 min

What's here


Related content

ServiceNow rules





Last modified on Sep 30, 2022