---
sourceDocument: Brazil Strategic Portfolio Management
sourceDocumentLink: https://www.servicenow.com/docs/r/it-business-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Strategic Portfolio Management

ft:clusterId :

    - itbm

bundleId :

    - itbm

workflow :

    - Technology


---

# Scheduled Script Execution form

# Scheduled Script Execution form {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Scheduled Script Execution form

The Scheduled Script Execution form in ServiceNow automates the migration and synchronization of legacy goal, strategy, work item, and goal relationship data into the Goal Framework and related Planning item tables.
This process enables customers to transition data from old tables to the modern Goal Framework structure while preserving critical relationships and enabling better strategic planning and management.
Show full answer Show less  

## Key Features

* **Migrate Goal Data:** Moves all existing goal records from the legacy Goal table to the Goal Framework table, retaining sysids and creating corresponding target records and relationships to work items (Project, Demand, Program).
* **Migrate Strategy Data:** Transfers strategy records from legacy strategy tables into the Strategic Priority table, maintaining sysids.
* **Handle Multiple Strategy Mappings:** Since a goal can be mapped to only one strategy in the Goal Framework, this process clones goals if multiple strategies are linked, creating sub-goals with appropriate parent-child relationships and strategy assignments.
* **Migrate Strategy-Work Item Relationships:** Moves existing strategy-to-work item associations into the Goal Relationship table. If no goal exists for a given strategy-work item pair, a dummy goal is created to maintain the relationship.
* **Migrate Goal Relationships for Assigned Entities:** Populates the Assigned entity type and Assigned entity fields on Goal records based on existing relationships, including custom entity types, consolidating data for improved portfolio plan management.
* **Cloning for Multiple Assignments:** When a goal is linked to multiple assigned entities, cloned sub-goals are created so each relationship is properly represented and managed.

## Practical Benefits for ServiceNow Customers

* Automates comprehensive data migration from legacy strategic planning tables to the Goal Framework, reducing manual effort and errors.
* Preserves critical relationships between goals, strategies, work items, and assigned entities, ensuring continuity and data integrity.
* Supports complex relationships such as goals linked to multiple strategies or entities by intelligently cloning goals and managing parent-child hierarchies.
* Enables better visibility and management of strategic goals within portfolio plans by consolidating entity assignments.
* Facilitates adoption of the Goal Framework for strategic planning with minimal disruption to existing data and processes.  
Scheduled Jobs are automated pieces of work that can be performed at a specific time or
on a recurring schedule.

## Migrate Goal, Strategy, and Work item data to the Goal Framework and related Planning item tables {#scheduled-script-execution-form-egm__section_xhh_kj5_qzb}

Use the Migrate Goal, Strategy, and Work item data to the Goal Framework and related Planning item tables job to migrate the legacy goals data to the Goal Framework tables.
{#scheduled-script-execution-form-egm__scheduled-job-to-migrate-goals-data-parameters__entry__2}

| Parameter | Description |
|-|-|
| migrateGoalData | * Migrates all existing goal records from the Goal \[goal\] table to the Goal \[sn_gf_goal\] table. The sys_id remains the same. The corresponding target records will be created in the Target \[sn_gf_goal_target\] table. * Creates the existing relationship between the goal and work items (Project, Demand, Program) in the Goal Relationship \[sn_gf_goal_m2m_relationship\] table with the first goal (from the order in the glide list) as the primary goal. {#scheduled-script-execution-form-egm__ul_gmv_jrg_wqb} |
| migrateStrategyData | Migrates all existing strategy records from the Enterprise Strategy \[enterprise_strategy\], Business Unit Strategy \[business_unit_strategy\], and Strategic Objective \[strategic_objective\] tables to the Strategic Priority \[sn_gf_strategy\] table. The sys_id remains the same. |
| migratingGoalStrategyM2Mdata | In Goal Framework, a goal can be mapped to only one strategy. If an existing goal has two strategies mapped to it, a clone of the goal will be created (one as a generic goal and another as a sub-goal) with the same strategy populated for both. And, for the sub-goal, the first goal will be set as the parent goal. For example, consider a scenario where an existing goal (G1) is mapped to five strategies (S1, S2, S3, S4, and S5). Then, four clones of G1 will be created as sub-goals (G2, G3, G4, and G5) and the parent goal is populated as G1. For the parent goal (G1) and the sub-goals (G2, G3, G4, and G5), the Strategy field is populated respectively (S1, S2, S3, S4, and S5). Note: The name of the cloned sub-goal will be prefixed with `Cloned SubGoal:`, followed by the parent goal name. |
| migrateStrategyWorkItemRelData | * Migrates the existing relationship of strategy and work items (Project, Demand, Program) to the Goal Relationship \[sn_gf_goal_m2m_relationship\] table. * If a goal doesn't have an association between the strategy (as current strategy) and the work item in the Goal Relationship \[sn_gf_goal_m2m_relationship\] table, a dummy goal will be created with a strategy value of current strategy. And, a goal relationship is created with the dummy goal and the work item in the Goal Relationship \[sn_gf_goal_m2m_relationship\] table. Note: The name of the dummy goal will be prefixed with `Goal:`, followed by the strategy name. {#scheduled-script-execution-form-egm__ul_imv_jrg_wqb} |
[Table 1. Scheduled Script Execution form]

{#scheduled-script-execution-form-egm__scheduled-job-to-migrate-goals-data-parameters-form}

## Migrate goal relationships for assigned entities {#scheduled-script-execution-form-egm__section_yhh_kj5_qzb}

Use the Migrate goal relationships for assigned entities job to populate the fields, Assigned entity type and Assigned entity on the [Goal form](https://www.servicenow.com/docs/ozSIAo8aw4Nxi9fM1pILJw "Use the Goal form to create goals for your organizational strategic priorities.") based on the existing values in the legacy fields, Business Unit, Department, Company,
Portfolio, and any customized entity field.
{#scheduled-script-execution-form-egm__table_smd_b5p_fwb__entry__2}

| Parameter | Description |
|-|-|
| Migrate goal relationships for assigned entities | (For Strategic Planning users) Populates the fields, Assigned entity type and Assigned entity on the [Goal form](https://www.servicenow.com/docs/efQilBzFpT78DfF0RaIK7w "Use the Goal form to create goals for your organizational strategic priorities.") based on the data in the Goal Relationship \[sn_gf_goal_m2m_relationship\] table if you've created an m2m relationship with lens entities other than Company, Business Unit, Department, and Portfolio. If users had already created m2m relationship, they may use this script to move those relationships from the m2m table to the goals table to access and manage those goals in the respective portfolio plans. If the goal has only one relationship with an assign entity table type, the Assign entity type and Assign entity fields are populated on the Goal \[sn_gf_goal\] table based on the Goal Relationship \[sn_gf_goal_m2m_relationship\] table. If the goal has multiple relationships with an assign entity table type, number of relationships (n) cloned sub-goals will be created and the Assign entity type and Assign entity fields are populated on the Goal \[sn_gf_goal\] table based on the data in the Goal Relationship \[sn_gf_goal_m2m_relationship\] table for each cloned sub-goal. |
[Table 2. Scheduled Script Execution form]

{#scheduled-script-execution-form-egm__table_smd_b5p_fwb}

