---
title: Usage Of getMessage Function Without A Second Parameter
description: "Impact Area Performance         Severity Low         Affected Element Catalog Client Scripts Client Script Widget Angular Provider UI Action UI Script Rule ID **SN-0397** ## Impact The usage of getMessage function without a second…"
url: "https://community-staging.qualityclouds.com/qcdocs/qc/servicenow-rules/usage-of-getmessage-function-without-a-second-parameter/"
updated: "2025-03-21"
category: Rules
---

# Usage Of getMessage Function Without A Second Parameter

Impact Area

Performance

 

 

 

 

           Severity

Low

 

 

 

 

           Affected Element

Catalog Client Scripts

Client Script

Widget Angular Provider

UI Action

UI Script

Rule ID

**SN-0397**

## Impact

The usage of getMessage function without a second parameter causes the function call to be executed in synchronous way. It can lead to performance issues.

## Remediation

Always use a second parameter for a callback function to make the function call asynchronous.

### **Time to fix**

40 min

## Code examples

### Noncompliant code

getMessage(“Your Message key”);

### Compliant code

getMessage(“Your Message key”, function(msg){ var otherMessage = msg; });
