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

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: Jan 20, 2020

+ Answer
Request

5 Answers

Edgar Chivichon

Edgar Chivichon

Answered 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
 

kapilpgoyal

Kapilpgoyal

Answered 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.

 

Joao Rosa

Joao Rosa

Answered 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
 

Supersharp

Supersharp

Answered Jul 06, 2019

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

1
 

pjazurin

Pjazurin

Answered 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
 

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.