How to bulk populate Planning Item table after adding new custom field mappings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2025 08:45 AM
I've added new custom field mappings to the alignment integrations. These fields are already populated in the dmn_demand and pm_project tables, but are not populated in the planning item table. I tried to run a background script to just "touch" those fields hoping the update would populate the planning item table and it didn't work. I then went into an individual project record, changed the existing value, saved, changed it back to the original value, saved, and then saw that the planning item table was populated. What is the best way to do this with 1000s of records?
The script I used that didn't work:
var grAlignProject = new GlideRecord('sn_align_core_project');
grAlignProject.query();
while (grAlignProject.next()) {
var grProject = new GlideRecord('pm_project');
if (grProject.get(grAlignProject.getValue('execution_entity_item'))) {
grProject.setValue('business_unit', grProject.getValue('business_unit'));
grProject.update();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2025 02:26 AM
Hi @Marlon Dale
Can you try replacing the penultimate line with below line (Assuming you want to update the records on alignment side)!
grAlignProject.setValue('business_unit', grProject.getValue('business_unit'));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2025 10:17 AM
It didn't work. Still the only thing that's working is manually changing the business unit on the pm_project record form to a new value, then changing it back.