Universal Containers は、チェックボックス フィールド show _help co を含む階層カスタム設定 user Prefs_c にユーザー設定を保存します。会社レベルのデフォルトは組織レベルで保存されますが、ユーザー レベルで上書きされる場合があります。ユーザーが設定を上書きしていない場合は、デフォルトを使用する必要があります。 現在のユーザーの show_Help_ c 設定をどのように取得する必要がありますか?
正解:B
The correct way to retrieve the show_Help_ c preference for the current user is to use the User Prefs c.getValues(UserInfo.getUserid{)).Show_Help c statement. This statement will return the user-level value of the show_Help_ c field for the current user, if it exists, or the org-level value, if it does not. The User_Prefa_ c.getValuea().Show_Help_ co statement will always return the org-level value, regardless of the user. The User_Prefs_c.getlnstance(].Show Help c statement will return the user-level value of the show_Help_ c field for the current user, if it exists, or null, if it does not. The User Prefs_c.show Melp_c statement will cause a compile-time error, as the show_Help_ c field is not a static property of the User Prefs_c class. Reference: [Custom Settings Methods], [Custom Settings]