PDI · Question #55
A developer created these three Rollup Summary fields in the custom object, Project_ct, The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for…
The correct answer is B. Formula field. Since existing rollup summary fields already provide the counts for approved and rejected timesheets on the Project_c object, a simple formula field is the most efficient and lowest maintenance solution to calculate their ratio.
Question
A developer created these three Rollup Summary fields in the custom object, Project_ct, The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project. Which should the developer use to Implement the business requirement in order to minimize maintenance overhead?
Options
- ARecord-triggered Flow
- BFormula field
- CApex Trigger
- DProcess Builder
How the community answered
(24 responses)- A4% (1)
- B75% (18)
- C8% (2)
- D13% (3)
Why each option
Since existing rollup summary fields already provide the counts for approved and rejected timesheets on the Project_c object, a simple formula field is the most efficient and lowest maintenance solution to calculate their ratio.
A Record-triggered Flow would add more complexity and maintenance compared to a declarative formula field, especially since the source data (rollup summaries) is already available.
A formula field can directly reference the existing Roll-up Summary fields that count approved and rejected timesheets on the Project_c object. This provides a real-time, automatically updated ratio with minimal maintenance overhead, as formulas recalculate automatically.
An Apex Trigger would be an overkill and higher maintenance for a simple calculation that can be done declaratively with a formula field based on existing data.
Process Builder, like Flow, could potentially update a field, but it's less direct and efficient for a simple ratio calculation from existing fields than a formula field and would involve more steps and maintenance.
Concept tested: Formula fields with rollup summaries
Source: https://help.salesforce.com/s/articleView?id=sf.fields_about_formula_fields.htm&type=5
Topics
Community Discussion
No community discussion yet for this question.