CostPlanBatchOperations - Global
-
- UpdatedJan 30, 2025
- 3 minutes to read
- Yokohama
- API reference
The CostPlanBatchOperations script include provides methods that enable the creation of a large number of cost plan records for demands and projects using batch processing. Use this script include instead of GlideRecord to more efficiently create multiple cost plan records.
Use the CostPlanBatchOperations.add() method to add any number of cost plans to a batch queue. Once you have added all the required cost plans, use the CostPlanBatchOperations.process() method to create/insert the cost plans in your instance. Until you call the CostPlanBatchOperations.process() method, the add requests remain in the batch queue (they are not yet added to your instance). If for some reason you need to remove all of the cost plans in the batch queue, use the CostPlanBatchOperations.clear() method.
To use this script include you must activate the PPM Standard (com.snc.financial_planning_pmo) plugin.
CostPlanBatchOperations - add(Object costPlan)
Adds one or more cost plans to a specified task (project or demand). Use this method when you want to create multiple cost plans.
Type | Description |
---|---|
void |
Example
This example shows how to add a simple batched cost plan.
CostPlanBatchOperations - clear()
Removes all cost plan objects that were added using the CostPlanBatchOperations.add() method.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
void |
Example
This example shows how to clear the batch queue after adding cost plans.
CostPlanBatchOperations - process()
Processes all of the cost plans that were added using the CostPlanBatchOperations.add() method and creates corresponding cost plans and relevant rollups.
Once the cost plans are successfully processed, the cost plan queue is cleared.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Array | Sys ID for each generated cost plan. |
Example
This example shows how to process a simple batched cost plan.