- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 03:16 AM
For a table I have to configure a form link "Show closed activities". This link should only be visible for users with role "emp_admin". When link pressed, the system should open a new tab with list of all closed records that apply to the same Employee.
When I click on the link, nothing is happening. What am I doing wrong?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 03:42 AM
gs object is server side and your UI action is client side.
So it's not working.
do this
I hope your state field name and choice value for Closed is correct. if yes then this will work
function showClosedActivites(){
var url = '/u_manager_activites_sv_list.do?sysparm_query=u_employee=' + g_form.getValue('u_employee') + '^state=Closed';
g_navigation.open(url, '_blank');
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-23-2023 03:42 AM
gs object is server side and your UI action is client side.
So it's not working.
do this
I hope your state field name and choice value for Closed is correct. if yes then this will work
function showClosedActivites(){
var url = '/u_manager_activites_sv_list.do?sysparm_query=u_employee=' + g_form.getValue('u_employee') + '^state=Closed';
g_navigation.open(url, '_blank');
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-23-2023 04:06 AM
I changed the code but still when I click on the link nothing is happening. My filed names are right, the state value for Closed is 6. I tried that too and it did not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 04:14 AM
can you share your latest script?
did you check any browser console error?
is pop-up enabled in your browser?
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-23-2023 05:53 AM - edited 03-23-2023 05:57 AM
I have no pop-up blocker enabled. But I do have some browser errors: