- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 02:24 AM
Hi,
i need to add a message for the ui action "attachment" to get displayed only on the incident form.
So for change, task whatever it needs to be the ootb message/functionality and only if the ui action is clicked in the incident form, i need to display a popup or even an additional message inside the add attachment form.
Anyone has a clue on how to do this?
The message must not be part of the above screenshot, it can be an alert message also, but need to be displayed when the user in the incident form clicks on the attachment button (paperclip) on top of the screen.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 03:25 AM
Hi,
So when user clicks on attachment icon an alert needs to be show
use below approach
1) go to UI pages
2) search for name as attachment
in the html section add this code as below; just in the beginning
since this should only work for incident table and not for all other tables use this logic which checks the table name & the message will only appear for incident table:
<j:if test="${JS:RP.getWindowProperties().get('target_table') == 'incident'}">
<script>
$j( document ).ready(function() {
alert("Attachment Icon Clicked Disclaimer");
});
</script>
</j:if>
screenshot below
1) for table which is not incident message is not shown when paper icon is clicked
2) for incident table it is showing the message once paper clip icon is clicked
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 02:31 AM
Hi
Please find this LINK.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks & Regards,
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 03:05 AM
Hi Viraj,
yes, but this would change the message for all tables not only for incident. I need to limit the additional message only for the incident table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 03:25 AM
Hi,
So when user clicks on attachment icon an alert needs to be show
use below approach
1) go to UI pages
2) search for name as attachment
in the html section add this code as below; just in the beginning
since this should only work for incident table and not for all other tables use this logic which checks the table name & the message will only appear for incident table:
<j:if test="${JS:RP.getWindowProperties().get('target_table') == 'incident'}">
<script>
$j( document ).ready(function() {
alert("Attachment Icon Clicked Disclaimer");
});
</script>
</j:if>
screenshot below
1) for table which is not incident message is not shown when paper icon is clicked
2) for incident table it is showing the message once paper clip icon is clicked
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 03:34 AM
Thanks - you saved my day! 🙂