Recalculating Calculated and Rollup Fields
Calculated and rollup field values are updated only when records or related records are modified. Therefore, to ensure that calculated and rollup fields are properly updated, you must manually trigger the Recalculate All Fields operation after you activate calculated or rollup fields, update rollup field values or field calculation code, or create new or recalculated rollup fields. Additionally, after ServiceMax version upgrades, some calculated or rollup field values may need to be recalculated.
Recalculate All Fields is an asynchronous operation that, when invoked with no parameters, recalculates all calculated and rollup fields for all records of every object that references the relevant fields. You can also specify single or multiple fields to be recalculated by either full identifiers or UUIDs, and also recalculate converted Currency Amount field values.
* 
Execution time can be two hours or longer, so to prevent the system from terminating the execution, in the active System Setting record, increase the Deferred Operation Timeout and Deferred Operation Result Retention Time field values as needed. To check the execution status of an asynchronous operation, call it again with the iop_deferred_operation_id parameter and pass in the unique identifier returned when the operation starts, for example:
https://<tenant_url>/instance/recalculate_all_fields?iop_deferred_operation_id=44d9ae58-e24c-4254-b66f-70d8eb2722bb
If calculated and rollup fields are configured in HTTP Notification Requests, this operation sends large numbers of sync data requests to Salesforce, and Salesforce records that are in a locked state fail during sync.
In cases where only one field needs to be recalculated, you can use this operation without incurring the resource overhead and time cost required to process high data volumes, or follow the steps in this procedure to recalculate the value manually in Max Designer.
In Service Board 24.0 and later, you can no longer enable the Recalculate on Read option for newly created or existing fields. Recalculate-on-read behavior is unchanged for existing fields that previously had the option enabled.
You can set optional parameters for the operation to support a variety of situations.
Parameters
Value
Description
io_field_identifier
Field full identifier. Single rollup fields are not supported.
io_field_uuid
Field UUID.
io_object_identifier
Object UUID.
calculation
all
All calculated and rollup fields are recalculated.
calculated
Only calculated fields are recalculated.
rollup
Only rollup fields are recalculated.
type
currency_converted
All converted Currency Amount fields are recalculated.
mode
simple
Optional parameter used only to recalculate a single field.
Examples
Action
Example
Description
Recalculate all calculated and rollup fields.
<tenant_url>/instance/recalculate_all_fields
All calculated and rollup fields for all records for each object that references each field are recalculated.
Recalculate specified fields by field full identifier.
Single field:
<tenant_url>/instance/recalculate_all_fields?io_field_identifier=<dev_field_identifier>
Specified calculated and rollup fields for all records for each object that references those fields are recalculated.
Multiple fields:
<tenant_url>/instance/recalculate_all_fields?io_field_identifier=<dev_field_identifier1>,<dev_field_identifier2>
Recalculate specified fields by field record ID
Single field:
<tenant_url>/instance/recalculate_all_fields?io_field_uuid=<field_uuid>
Specified calculated and rollup fields for all records for each object that references those fields are recalculated.
Multiple fields:
<tenant_url>/instance/recalculate_all_fields?io_field_uuid=<field_uuid1>,<field_uuid2>
Recalculate all calculated fields.
<tenant_url>/instance/recalculate_all_fields?calculation=calculated
All calculated fields for all records for each object that references each field are recalculated.
Recalculate all rollup fields.
<tenant_url>/instance/recalculate_all_fields?calculation=rollup
All rollup fields for all records for each object that references each field are recalculated.
Recalculate all converted Currency Amount fields.
<tenant_url>/instance/recalculate_all_fields?calculation=calculated&type=currency_converted
All converted Currency Amount fields are recalculated.
* 
To recalculate fields that support multiple currencies, you must first update conversion rates or the default system currency.
Recalculate a single field in one object.
<tenant_url>/instance/recalculate_all_fields?mode=simple&io_field_identifier=<field_identifier>&io_object_identifier=<object_identifier>
Only the specified field for the specified object is recalculated.
To manually recalculate a single calculated field:
1. In Max Designer, on the Developer Tools () launchpad menu, click Object Designer, and then in the left pane, search for and click the object for which you want to recalculate a field, for example, Job.
2. In the left pane, click Fields, and then in the right pane, in the list view, click the calculated field you want to manually update, for example, Additional Info.
3. In the right pane, click Recalculate Field Value, and then in the confirmation dialog, click Recalculate.
For more information:
Was this helpful?