- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2022 07:19 AM
On time sheet portal we have a link "Add Unassigned Task" using which a user can select any task by searching it. I want to restrict this search so users can only select a particular type of task, for example only incidents or demands which are work in progress.
I found an article for the same and tried to follow the steps but can't find the names mentioned in the post. Below is the link of the post: https://community.servicenow.com/community?id=community_article&sys_id=f6a035a8db3c6c10fa192183ca961...
Below is the portal view:
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 10:31 PM
Hello Chandler,
Go the Time Card Grid widget.
In that widget go to link function. In the link function you would see an AJAX call to /api/now/table/task.
There would be a sysparm_query to the AJAX call, change the parameter like this
sysparm_query: 'sys_class_name=pm_project^ORsys_class_name=pm_project_task^short_descriptionCONTAINS' + term + '^ORnumberCONTAINS'+ term,
This will restrict to project/project tasks alone.
Hope this helps. Please mark the answer as correct/helpful based on impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 10:18 PM
Hi Saurav,
yes, that default table part I have already done but that removes the tasks from the left side panel on the time sheet portal. It doesn't work for the "Add Unassigned Task".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 10:31 PM
Hello Chandler,
Go the Time Card Grid widget.
In that widget go to link function. In the link function you would see an AJAX call to /api/now/table/task.
There would be a sysparm_query to the AJAX call, change the parameter like this
sysparm_query: 'sys_class_name=pm_project^ORsys_class_name=pm_project_task^short_descriptionCONTAINS' + term + '^ORnumberCONTAINS'+ term,
This will restrict to project/project tasks alone.
Hope this helps. Please mark the answer as correct/helpful based on impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 10:35 PM
I will try and update you in some time. Thanks for your response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 11:29 AM
It worked like a charm, thanks.
Could you please help with the below as well
Restrict tasks from showing up on time sheet portal group task tab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2023 10:49 AM
Hi @Saurav11 ,
I made the changes as suggested by you, I am trying to pull only Project/Project tasks/Demand tasks as per below screenshot but Still it is pulling all the tasks. Please help here.
Thanks,
Talya