CRT-450 Exam QuestionsBrowse all questions from this exam

CRT-450 Exam - Question 11


A developer working on a time management application wants to make total hours for each timecard available to application users. A timecard entry has a Master-

Detail relationship to a timecard.

Which approach should the developer use to accomplish this declaratively?

Show Answer
Correct Answer: B

To make the total hours for each timecard available to application users in a declarative way, the developer should use a Roll-Up Summary field on the Timecard Object that calculates the total hours from timecard entries for that timecard. Roll-Up Summary fields are specifically designed for this purpose in a Master-Detail relationship, allowing for automatic calculation of values like sums, which is needed in this scenario.

Discussion

4 comments
Sign in to comment
HRVMMRVHOption: B
Aug 30, 2023

Certainly not A, since a declarative solution is needed. It should be B. Hours can be stored as number field on Timesheet entry records.

PriyankNOption: B
Feb 26, 2024

B is correct

CSYUOption: A
Jun 17, 2023

The answer is def A Although it's a Master-detail relationship, we can't use a roll-up summary field on date/time field when using SUM type. It's available only when using MAX/MIN as described in the Help page. When the developer wants to know total hours, he can use an Apex code and as the total hours doesn't have to be saved in DB in this case, so the answer is A. https://help.salesforce.com/s/articleView?id=sf.fields_about_roll_up_summary_fields.htm&type=5

CSYU
Jun 17, 2023

When it comes to the field type is Number, the answer can be B. The question is too abstract...

mariamarlenepereira9
Jan 5, 2024

Total (number of) hours = SUM, so this can be achieved using a roll up summary field

SS1121Option: B
Jun 18, 2024

B is correct, as option A is not declarative.