- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2022 04:14 AM
How to run a script on List View without onCellEdit. Like in a sense if we load a list view of table the script should run.
Thanks in Advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 12:28 AM
Hi,
then you can check this link where I shared solution 3 years ago
Display Info message only on list layout
The script section of query business rule will check and show info message only on list and not on form
var index = gs.action.getGlideURI().toString().indexOf('u_tableName_list'); // give the table name here
if(index == -1){
// it means it is form
}
else{
gs.addInfoMessage("click on the desired drink to know its nutritional value");
// it means it is list
}
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
‎01-20-2022 04:41 AM
You can use Query Business Rules and ACLs. That works when you are loading a list view.
Please mark this correct and helpful based on the impact.
Thanks,
Mohit Kaushik
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2022 11:06 PM
Hi Saran,
I can see you have marked my answer as helpful, if your query is resolved then you can mark this answer as correct so that this question can be removed from unanswered thread and other community members can get benefited from the same
Thanks,
Mohit Kaushik
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2022 11:13 PM
Hi,
you can use before update business rule as well which would run when some field gets updated on list view.
Can you please explain your business requirement so that the correct approach can be shared?
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
‎01-24-2022 11:27 PM
My requiement is I dont wont to run it in form view. I want it run only on list view