How to create a alert message on List View ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â03-15-2021 06:05 AM
Hi,
I want to show a alert message when i click a button on choice list.
Any suggestions?
Thank You,
Shabbir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â03-15-2021 06:15 AM
Hi,
You can use List Choice or List Banner button and make this as client side UI Action
Client - True
Onclick - showAlert();
Script:
function showAlert(){
alert('Your Message Here');
}
Regards
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
â03-16-2021 12:56 AM
Hi Ankur,
Thank you for the quick response , here i want the alert for "approve" ui action on sysapproval_approve table , that is a OOB ui action and client callable checknox is not true for that,
i tried by making client callable as true and put alert message , but the functioality is not working.
Any other alternatives to do this?
Thank you,
Shabbir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â03-16-2021 01:12 AM
Hi,
which UI action?
List choice or List Context Menu?
Regards
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
â03-16-2021 01:16 AM
you can convert that UI action as Client + Server
Client - true
Onclick - showMessage();
Script:
function showMessage(){
alert('Do you want to approve');
gsftSubmit(null, g_form.getFormElement(), 'approve_custom');
}
if(typeof window == 'undefined')
serverCode();
function serverCode(){
current.state="approved";
current.update();
new ApprovalUserFeedback().approved(current);
}
Changes like this
Regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader