Universal Containers stores user preferences in a Hierarchy Custom Setting, User_Prefs_c, with a Checkbox field, Show_Help_c. Company-level defaults are stored at the organizational level, but may be overridden at the user level. If a user has not overridden preferences, then the defaults should be used. How should the Show_Help_c preference be retrieved for the current user?

QuestionsCategory: Certified Platform Developer IIUniversal Containers stores user preferences in a Hierarchy Custom Setting, User_Prefs_c, with a Checkbox field, Show_Help_c. Company-level defaults are stored at the organizational level, but may be overridden at the user level. If a user has not overridden preferences, then the defaults should be used. How should the Show_Help_c preference be retrieved for the current user?
Admin Staff asked 4 months ago
Universal Containers stores user preferences in a Hierarchy Custom Setting, User_Prefs_c, with a Checkbox field, Show_Help_c. Company-level defaults are stored at the organizational level, but may be overridden at the user level. If a user has not overridden preferences, then the defaults should be used.
How should the Show_Help_c preference be retrieved for the current user?

A. Boolean show = User_Prefs__c.getValues(UserInfo.getUserId()).Show_Help__c;

B. Boolean show = User_Prefs__c.getInstance().Show_Help__c;

C. Boolean show = User_Prefs__c.Show_Help__c;

D. Boolean show = User_Prefs__c.getValues().Show_Help__c;








 

Suggested Answer: A

Community Answer: B

Reference:
https://developer.salesforce.com/forums/?id=906F00000008ySqIAI

This question is in Certified Platform Developer II Exam
For getting Salesforce Certified Platform Developer II











Disclaimers:
The website is not related to, affiliated with, endorsed or authorized by Salesforce. 
Trademarks, certification & product names are used for reference only and belong to Salesforce.
The website does not contain actual questions and answers from Salesforce's Certification Exams.

Next Post

Recommended

Welcome Back!

Login to your account below

Create New Account!

Fill the forms below to register

Retrieve your password

Please enter your username or email address to reset your password.