Which two actions should a developer take to accomplish the following - ProProfs
     

Which two actions should a developer take to accomplish the following task? A company wants to create an employee rating program that allows employees to rate each other. An employees average rating must be displayed on the employee record. Employees must be able to create rating records but are not allowed to create employee records. 



A. Create a trigger on the Rating object than updates a field on the Employee object.
B. Create a roll-up summary field on the Employee and use AVG to calculate the average rating score.
C. Create a lookup relationship between the Rating and Employee object.
D. Create a master-detail relationship between the Rating and Employee objects.

This question is part of Salesforce Developer 1 2019

+ AnswerRequest Answer
...

4 Answers

Joao Rosa

Joao Rosa

Answered on Aug 23, 2019

Define roll-up summary fields on the object that is on the master side of a master-detail relationship. If a relationship does not already exist, first create a master-detail relationship between the master object that displays the value and the detail object containing the records you are summarizing.

Edgar Chivichon

Edgar Chivichon

Answered on Jul 28, 2019

It should be: Create a lookup and create a trigger

1) If you create a lookup then you can't create a roll-up summary.

2) A roll-up summary AVG does NOT exist. There are just Count, Sum, Max, Min.

Ref:Defining Roll-Up Summary

Supersharp

Supersharp

Answered on Jul 06, 2019

You cannot create a roll-up summary with a lookup relationship so you'll need to create a trigger.

pjazurin

Pjazurin

Answered on Jun 20, 2019

Create a roll-up summary field on the Employee and use AVG to calculate the average rating score.
Create a lookup relationship between the Rating and Employee object.

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.