How to delete/remove resource capacity/aggregates after employee has been terminated?

Pranav_Thanedar
Mega Sage

Let us assume that we have an employee who was part of the organisation until 01 Feb. 2025 but his capacity and aggregates are generated until 31 Dec. 2025, using the related links on the employee record on sys_user table.

Pranav_Thanedar_0-1742293700570.png

 

Now the resource_aggregate_monthly and resource_aggregate_weekly tables show the aggregates generated until 31 Dec. 2025.

 

After the employee is terminated, the Employment end date field on employee Profile (sn_employee_profile) table is updated to the employee termination date. After the date is updated, if we run a job/script to update employee capacity and aggregates again, this doesn't delete the capacity or aggregates generated for dates after employee termination date.

 

Is there a way to automatically delete these aggregates? 

 

The employee name still shows up while creating resource assignments because of this issue.

1 ACCEPTED SOLUTION

Hi @Alpa82 ,

 

Its "Resource Termination Handler" Scheduled Script Execution job.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.

 

Regards,

Pranav Thanedar

View solution in original post

5 REPLIES 5

EmeliaH
Tera Contributor

I also have this question^^

Wendy Harding
Tera Contributor

Also have the same issue.

Pranav_Thanedar
Mega Sage

Hi @Wendy Harding and @EmeliaH ,

 

I was able to figure out this. Make sure that the employee end date is populated in employee profile table, there is a job which runs https://<instance_name>.service-now.com/nav_to.do?uri=sysauto_script.do?sys_id=6389bea753770010be19d...

 

The job will automatically delete the capacity records for employees whose end date has passed. Below is the documentation link.

 

https://www.servicenow.com/docs/bundle/yokohama-it-business-management/page/product/resource-managem...

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.

 

Regards,

Pranav Thanedar

Hello,Thank you for the provided information, I am unable to copy the link provided for the schedule job, could you please share the name of the scheduled job? thank you