Salesforce
PDII · Question #224
PDII Question #224: Real Exam Question with Answer & Explanation
Sign in or unlock PDII to reveal the answer and full explanation for question #224. The question stem and answer options stay visible for context.
Question
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?
Options
- ABoolean show = User_Prefs__c.getValues(UserInfo.getUserId()).Show_Help__c;
- BBoolean show = User_Prefs__c.getInstance().Show_Help__c;
- CBoolean show = User_Prefs__c.Show_Help__c;
- DBoolean show = User_Prefs__c.getValues().Show_Help__c;
Unlock PDII to see the answer
You've previewed enough free PDII questions. Unlock PDII for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.