Salesforce (3) 썸네일형 리스트형 Apex Testing Apex Test Code 예제를 보며 System.assertEquals() , System.assert()를 사용하여 예외 케이스까지 테스트 해본다. public class AccountService { // Enum to represent Account Levels public enum AccountLevel { STANDARD, PREMIUM, VIP } // Method to update the Account Level based on revenue public static void updateAccountLevel(Id accountId) { Account account = [SELECT Id, AnnualRevenue FROM Account.. Get List of Profiles that are visible to a particular tab How can I get a list of profiles visible on a particular tab? //get all Tab names to do a query of prmissionSetTabSetting List tabList = [SELECT Label, Name, Url From TabDefinition ORDER BY Label]; Map tabMap = new Map(); for(TabDefinition tab : tabList){ tabMap.put(tab.Name, tab); } //Querying using a nameset List targetList = [SELECT Parent.Profile.Name, Parent.Iscustom, Name, Visibility FROM .. [Salesforce] how to set exception message This is useful when you want to display the message of Exception handling in the controller on the screen. Exceptions can be top-level classes, so your custom exception class must extend exception. All exception classes extend the system-defined base class Exception, and therefore, inherits all common Exception methods. Let me give you an example of how this is the way I used it. 1) At the top o.. 이전 1 다음