getMessage on Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2017 06:23 AM
For some reason SN stopped supporting the getMessage function on the mobile or SP interface... So what's the equivalent to do this? They must have some function to do some translations on SP in client scripts, right?
Client script on record producer:
Messages:
When I click 'try it' on record producer, I get:
When I go to portal, I get:
With error message:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2017 06:29 AM
HI Peter,
Did you try with ${}
I am not sure how this will behave in a client script but its worth a shot.
Please mark correct/helpful based on the impact of the response.
Thanks
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2017 07:11 AM
gs is only available on the server-side
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2017 07:14 AM
I found the solution here: Service Portal and client scripts. Basically getMessage has a second parameter client side, a callback function... Just like GlideRecord.query or GlideRecord.get... I should have known...
I changed my code to:
And now it works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2017 07:24 AM
Nice to know that