Message to display before approving time cards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 07:40 AM
We have cases where users are charging time to projects without selecting a task(resource plan) and we would like to display a notification to the project manager before they approve that time. We want to allow this type of time submission, but want the PM to be made aware of it to prevent time approval which should not been charged to the project. Ultimately, the best case scenario would be the PM to select the Approve button and then a message would display indicating something like, 'Are you sure you want to approve time card XXX, as there are no tasks/resource plans associated with it?'. If they click Yes or OK, then the time card would get approved. If no, then the time card could get rejected or it could simply take the PM back to the menu and they can manually reject the time card. Where this could get tricky is I know a lot of PMs do not go through the time cards one by one, but simply select all of them and try to approve with one click. If this is something that is possible, if they are ok with them not having tasks associated, then the approval process could go through. If not, we could stop all approvals or just approve the ones that do contain a task/resource plan and leave the others as submitted and the let the PM deal with them one by one. If anyone has any ideas on this, please let me know. Thanks ahead of time!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 08:05 AM
Hi @rdskn023ET ,
Yes you can achieve it. Do the following.
- Make client callable Approval UI Action.
- In clint side script you can call script include to check if any time card have empty task or not.
- If you found that task are empty then simply display the message.
- Else submit the form to execute the server side script.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------