All budget items that are entered in the system can be summed and rolled up onto the related project, in any custom field, based on any defined filter criteria. Leverage Lookup Rollup Summaries in the system to add these custom rollups to support any type of rolled up budget tracking that is needed in the system.
ADD A NEW BUDGET ROLLUP
- Navigate to the Manage Lookup Rollup Summaries tab.
- From the Select Lookup Rollup Summary drop down select Create new.
- Enter a name for your new rollup in the Lookup Rollup Summary Name field and enter a unique name, without spaces, in the Lookup Rollup Summary Unique Name field.
- In the Lookup Relationship section define how the records that are calculated are related.
- Enter the API name of the Parent Object (
apollo__Project__c
). - Enter the API name of the Child Object (
apollo__Budget_Item__c
). - Enter the API name of the field that defines the relationship from the Child Object to the Parent Object (
apollo__Project__c
). - In the relationship field enter any criteria that will define which Child Records will be used to calculate the rollup. Note, the Relationship Criteria field uses standard SOQL.
Example:apollo__Status__c = 'Approved' AND apollo__Type__c = 'Budget'
- In the Relationship Criteria Fields enter a list of the API names of all of the fields that are used in the SOQL query entered in the Relationship Criteria Field. Each value should be entered on a new line.
- Enter the API name of the Parent Object (
- In the Follup Details section define how the result of the rollup is calculated.
- Enter the API name of the field that will be agreggated from the Child Records (apollo__amount__c).
- If the records should be ordered when calculating the result (i.e. in decending or ascending order) enter the API name of the field that should be used order to records by in Field to Order by. If ordering the results is not necessary the field can be left empty.
- Select the Aggregate Operation that will be applied to results and populated in the results field on the Parent Object.
- Enter the API name of the field that the results of the aggregation will be populated (apollo__Additional_Expense_Budget__c).
- Check the Aggregate All Rows checkbox if every record in the database should be calculated; including records that have been flagged for deletion.
Recommendation: leave the All Rows checkbox unchecked. - Enter a Row Limit if you would like to limit the number of records that are used in the aggregation.
Recommendation: lead the Row Limit empty. - Do not check the Active checkbox.
- Select how the lookup rollup summary should be run:
- Realtime – If Relatime is selected the system will run the calculation everytime a record of the Child Object type is created, edited or deleted for all of the records that meet the criteria defined in the Lookup Relationship.
- Scheduled – If Scheduled is selected the system will recalculate all records in the system every day, week or month at the scheduled date/time.
- Developer – The lookup rollup summary will be calculated when it is triggered by APEX code.
- Process Builder – The lookup rollup summary will be calculated when it is triggered by a process builder.
- Select the Calcuation Sharing Mode:
- User – The results will be calculated enforcing system and user security.
- System – The results will be calculated as though an administrator is running the calculation (recommeneded)
- The remaining fields can be left blank, but you may enter a Description for the rollup summary to document what is being calculated.
- Click Save.
ACTIVATING A ROLLUP
If no other rollup summaries exist on the Child Object
- Click the Manage Child Trigger button.
- At the bottom of the Deployment page for the Lookup Rollup Summary click the Deploy button.
- Proceed to Step 1 under If other rollup summaries exist on the Child Object.
If other rollup summaries exsit on the Child Object
- Check the Active checkbox on the Lookup Rollup Summary.
- Click the Save button.
- To calculate the new values in the system click the Full Calculate button.
See Also
Edit additional services budget rollup
Add custom fields for projects and supporting objects
Supporting Salesforce Docs
Page Layouts
Field-level security