Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Second Parameter of getMessage() on Client Side

Mike McCall
Giga Guru

I was recently inspired by Chuck Tomasi's post on gs.getMessage() - The Second Parameter, but when I tried to add a second parameter to the client-side getMessage() function, it didn't seem to work.

Does anyone know if the client-side getMessage() function does not accept a second parameter like the server-side gs.getMessage() does?

(If it matters, we're currently on Eureka Patch 7.)

1 ACCEPTED SOLUTION

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

Hello Michael,



getMessage(String) on client side uses only one parameter vs gs.getMessage(String, Object) that can use a second parameter.



Regards,


Sergiu


View solution in original post

15 REPLIES 15

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

Hello Michael,



getMessage(String) on client side uses only one parameter vs gs.getMessage(String, Object) that can use a second parameter.



Regards,


Sergiu


Sergiu could you please explain how you came to that conclusion? I am also curious by Michael's question and the reasoning behind why that is the case.


sergiu_panaite
ServiceNow Employee
ServiceNow Employee

Hi Kiley,



I checked the source code to understand how the function works.


I hope this answers your question.



Regards,


Sergiu


Ah ha, straight from the source! Thanks, Sergiu!



Kiley's second question is a good one, too: is there a particular reason (or reasons) behind limiting the client-side function in this way?