Which two actions should a developer take to accomplish the following - ProProfs Discuss
Topics-
Products +
     

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
Asked by Pjazurin, Last updated: Nov 14, 2019

+ AnswerRequest Answer
...

5 Answers

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.

2
 Reply

kapilpgoyal

Kapilpgoyal

Answered on Oct 15, 2019

Agreed with Edgar that AVG function is not available for roll-up summary. Also, there is no strong reason to created Master-Detail relationship when lookup can serve the need.

 Reply

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.

1
 Reply

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.

1
 Reply

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.
1
 Reply

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.