ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 10 - Certified Data Architect discussion

Report
Export

Universal Containers (UC) has an open sharing model for its Salesforce users to allow all its Salesforce internal users to edit all contacts, regardless of who owns the contact. However, UC management wants to allow only the owner of a contact record to delete that contact. If a user does not own the contact, then the user should not be allowed to delete the record. How should the architect approach the project so that the requirements are met?

A.
Create a 'before delete' trigger to check if the current user is not the owner.
Answers
A.
Create a 'before delete' trigger to check if the current user is not the owner.
B.
Set the Sharing settings as Public Read Only for the Contact object.
Answers
B.
Set the Sharing settings as Public Read Only for the Contact object.
C.
Set the profile of the users to remove delete permission from the Contact object.
Answers
C.
Set the profile of the users to remove delete permission from the Contact object.
D.
Create a validation rule on the Contact object to check if the current user is not the owner.
Answers
D.
Create a validation rule on the Contact object to check if the current user is not the owner.
Suggested answer: A

Explanation:

To allow only the owner of a contact record to delete that contact, the data architect should create a ''before delete'' trigger to check if the current user is not the owner. The trigger can use the UserInfo.getUserId() method to get the current user's ID and compare it with the OwnerId field of the contact record. If they are not equal, the trigger can add an error to the record and prevent it from being deleted. The other options are not suitable for meeting the requirements, as they would either restrict the edit access or delete access for all users, regardless of ownership.

asked 23/09/2024
Kenny McCue
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first