Recalculating Resource End Date Based on New Planned End Date

KaiSess
Tera Contributor

Is there a way to auto recalculate the resource assignment end date for multiple resources (large project with many resources) if the planned end date has been moved to an earlier date?

 

1 REPLY 1

pavani_paluri
Giga Guru

Hi @KaiSess ,

Please see below options to recalculate:

Option 1: Use the OOTB “Recalculate Allocation” Button which is manual
Go to the Project record
Under the Resource Plans tab, there's usually a "Recalculate Allocation" UI action.
This will adjust the allocations based on the new project dates.
Option 2: Business Rule or Script to Auto-Update
You can create a Business Rule on the pm_project table to trigger a script when the Planned End Date changes. This script can update all related Resource Plans or Resource Allocations.

Example:

// Business Rule: After Update on pm_project
if (current.end_date.changes()) {
var gr = new GlideRecord('resource_plan');
gr.addQuery('project', current.sys_id);
gr.query();
while (gr.next()) {
if (gr.end_date > current.end_date) {
gr.end_date = current.end_date;
gr.update();
}
}
}
This will automatically update resource plan end dates if they're later than the new project end date.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P