試験CRT-450 トピック1 問題70 スレッド
Salesforce CRT-450のリアル試験問題集
問題 #: 70
トピック #: 1
問題 #: 70
トピック #: 1
A company has a custom object, Sales, }_Help_Request__c, that has a Lookup relationship to Opportunity.
The Seles Help Request__c has a mumber field, Number_ct_Hours__c, that represents the amount of time spent on the Sales_Help Request__C.
A developer is tasked with creating a field, total_Hour2__c, on Opportunity that should be the sum of all of the Number_of_Hours_c values for the Sales_Help_Request__c records related to that Opportunity.
What should the developer use to implement this?
The Seles Help Request__c has a mumber field, Number_ct_Hours__c, that represents the amount of time spent on the Sales_Help Request__C.
A developer is tasked with creating a field, total_Hour2__c, on Opportunity that should be the sum of all of the Number_of_Hours_c values for the Sales_Help_Request__c records related to that Opportunity.
What should the developer use to implement this?
おすすめの解答:C 解答を投票する
To implement the total_Hours__c field on the Opportunity object, the developer should use a roll-up summary field on the Opportunity object. A roll-up summary field calculates values from related records, such as those in a related list1. In this case, the roll-up summary field on the Opportunity object would sum up the Number_of_Hours__c values from the Sales_Help_Request__c records that are related to the Opportunity via the Lookup relationship. This is the simplest and most declarative way to achieve the requirement.
The other options are not valid because:
* A roll-up summary field on the Sales_Help_Request__c object would not be able to aggregate the values from the child records to the parent record. A roll-up summary field can only calculate values from the child records to the parent record in a master-detail relationship, not a lookup relationship1.
* A trigger on the Opportunity object would not be able to access the Number_of_Hours__c values from the Sales_Help_Request__c records without performing a SOQL query. A trigger can only access the fields of the records that are being inserted, updated, deleted, or undeleted2. A trigger would also require more coding and testing than a roll-up summary field.
* A record-triggered flow on the Sales_Help_Request__c object would not be able to update the total_Hours__c field on the Opportunity object without performing a SOQL query and a DML
* operation. A record-triggered flow can only access and update the fields of the record that triggered the flow3. A record-triggered flow would also be more complex and less efficient than a roll-up summary field.
References:
* 1: Roll-Up Summary Field - Salesforce
* 2: Triggers and Order of Execution - Salesforce
* 3: Record-Triggered Flows - Salesforce
The other options are not valid because:
* A roll-up summary field on the Sales_Help_Request__c object would not be able to aggregate the values from the child records to the parent record. A roll-up summary field can only calculate values from the child records to the parent record in a master-detail relationship, not a lookup relationship1.
* A trigger on the Opportunity object would not be able to access the Number_of_Hours__c values from the Sales_Help_Request__c records without performing a SOQL query. A trigger can only access the fields of the records that are being inserted, updated, deleted, or undeleted2. A trigger would also require more coding and testing than a roll-up summary field.
* A record-triggered flow on the Sales_Help_Request__c object would not be able to update the total_Hours__c field on the Opportunity object without performing a SOQL query and a DML
* operation. A record-triggered flow can only access and update the fields of the record that triggered the flow3. A record-triggered flow would also be more complex and less efficient than a roll-up summary field.
References:
* 1: Roll-Up Summary Field - Salesforce
* 2: Triggers and Order of Execution - Salesforce
* 3: Record-Triggered Flows - Salesforce
Hirata 2026-08-03 04:26:36
コメント
他人の解答コメントを賛成するのも、その解答に一票を入れることになります。したがって、すでに同じ意見の投票コメントが存在する場合、新規コメントをする代わりに賛成することもできます。
コメントを通報する
コメント中
今すぐ 新規登録 / ログイン (無料です)。