- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2021 03:46 AM
Hi,
I got below requirement, please let me know if anyone has implemented it before:
1. Display a message to all users in their local language post login to Servicenow Instance .
2. This message should only be displayed once per session and not everytime.
I have gone through below article as well but couldn't get it properly how it's working and how should I convert pop up message in logged in users local language and how can we set time for a particular session after which message needs to be displayed again.
https://community.servicenow.com/community?id=community_article&sys_id=ca3f3c47db7edc504aa5d9d968961929
Thanks,
Vivek
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2021 10:41 PM
Hello Vivek,
1. How and where to set the frequency parameter so that dialog box can be again displayed.
--> The current implementation shows the dialog on the basis of user's session. If you want to add an extra condition to set the frequency then you can create a system property storing the value (frequency). Then you need to update the SI : sessionUtil() with extra condition of checking the frequency value.
2.I have added 2 entries in sys_ui_message table for same key value but different for message and language field. Now how to use this in code which can display the message in logged in user's language. Also I have changed the language for 2 users in user table.
--> You need to update the message in the UI Page and Client script as mentioned in the below link:
https://developer.servicenow.com/connect.do#!/event/knowledge19/CCW0689/knowledge19_CCW0689_section_3_translate_a_ui_page
Please mark correct if this helps.
Thanks,
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2021 04:08 AM
Hi Vivek,
Have you tried the steps as mentioned in the post? What issue you are facing in implementation?
Regarding the localization, you need to install the localization plugin and then you need to configure the message in sys_ui_message table for a particular Language with same key.
https://docs.servicenow.com/bundle/quebec-platform-administration/page/administer/localization/concept/translating-applications.html
https://docs.servicenow.com/bundle/quebec-platform-administration/page/administer/localization/reference/r_MessageTable.html
Thanks,
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2021 04:51 AM
Thanks for your reply Ajay, I was able to install required plugins for different languages.
Also, code given in post is also working fine for me as well.
I have below queries though:
1. How and where to set the frequency parameter so that dialog box can be again displayed.
Like I should be able to configure the duration after which pop up message is displayed again.
2.I have added 2 entries in sys_ui_message table for same key value but different for message and language field. Now how to use this in code which can display the message in logged in user's language. Also I have changed the language for 2 users in user table.
Links says that we should use getMessage method in client script to get this working with key passed as parameter but not able to get this working, could you also please suggest where and how to put this code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2021 10:41 PM
Hello Vivek,
1. How and where to set the frequency parameter so that dialog box can be again displayed.
--> The current implementation shows the dialog on the basis of user's session. If you want to add an extra condition to set the frequency then you can create a system property storing the value (frequency). Then you need to update the SI : sessionUtil() with extra condition of checking the frequency value.
2.I have added 2 entries in sys_ui_message table for same key value but different for message and language field. Now how to use this in code which can display the message in logged in user's language. Also I have changed the language for 2 users in user table.
--> You need to update the message in the UI Page and Client script as mentioned in the below link:
https://developer.servicenow.com/connect.do#!/event/knowledge19/CCW0689/knowledge19_CCW0689_section_3_translate_a_ui_page
Please mark correct if this helps.
Thanks,
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2021 02:08 AM
Thanks Ajay, reached 1 step closer now!
Just would like to know more on below :
If solution is configured to show message for a session, then why it's not showing for each login. It appeared for a fresh login and then after logging out and on relogin with same user, the message didn't appear. When it will appear next ?