- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2020 07:35 AM - edited 01-08-2025 02:14 PM
We have a requirement to allow all users to recall their own timesheets from timesheet portal after Approved/Processed. Servicenow baseline is to only allow timecard_approver and timecard_admin role to recall timesheets. I found the script include 'TimeCardUIActionHelper' and updated the canRecall function section to replace the role 'timecard_approver' with 'timecard_user'. And that did not do the trick. I'm guessing there is something I need to do on portal side too. I'm also concerned I may be heading down a dangerous path. Don't love the idea of modifying this script inlcude. Any suggestions on how I can handle? Hopefully I'm just overlooking something.
Solved! Go to Solution.
- Labels:
-
Time Card Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2020 06:42 PM
Hello Greg,
In this case, you will have to modify the SI to grant the "timecard_user" to recall a time card. You will need to modify this SI - TimeCardUIActionHelper
I add this line of code an i got it to work on the portal
(gs.hasRole('timecard_approver')||gs.hasRole('timecard_user'));// added the timecar_user
BEFORE the SI mod -
AFTER the SI mod -
It's not that big of a modification. I would leave a comment to know it was changed for future references.
I hope that helps!!
PS I also add the line of code to the 'TimeSheetUIActionHelper' SI and it worked as well. You can see the Red button in the picture for the timesheet recall.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 06:38 AM
Hi @Miguel Donayre Can you clarify the line of code added to display the red "Recall" button? I am not seeing it in any of your screen shots. One a side note, thank you for the information. adding the role helped me. I also added the "Submitted" state to allow the Recall function.
Regards,
Jeremy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 02:15 PM
Sorry I did this for a customer years ago and do not have access to the system anymore. I also wouldn't be surprised if things have changed since then and it may not be the best solution anymore.