how to use gs.getMessage() in scope?

Meloper
Kilo Sage

how to use gs.getMessage() in scope?
Do we have an alternative?

3 REPLIES 3

Not applicable

Hi @Meloper ,

Recommended way to use getMessage() is 

var message = gs.getMessage("This is the message with params {0}", param);
gs.addInfoMessage(message);

Alternately, it can also be written as 

var message = "This is the message with params {0}";
gs.addInfoMessage(gs.getMessage(message,param));

and it works. 

 

Basheer
Mega Sage

OlaN
Tera Sage

Hi,

The method gs.getMessage() works in both Global scope, and in Scoped Apps.

You can read more on the Developer site.

 

Do note that you will need to execute the operation once in order to set up the cross scope privileges needed.

 

What issue are you facing?