Salesforce Certified Platform Developer II (Plat-Dev-301) PDII Question # 56 Topic 6 Discussion

Salesforce Certified Platform Developer II (Plat-Dev-301) PDII Question # 56 Topic 6 Discussion

PDII Exam Topic 6 Question 56 Discussion:
Question #: 56
Topic #: 6

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;


Get Premium PDII Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.