[Salesforce] Custom Settings

__Dev_1·2024년 5월 9일
0

Salesforce

목록 보기
14/15

Custom Settings?

custom objects과 유사하며, 별도의 데이터베이스 쿼리 호출없이 데이터에 접근할 수 있다.

Custom Settings 종류.

List Custom Settings
⭐ Setup >> Schema Settings >> Manage list custom settings type 체크

	데이터 가져오기 -- 데이터 맵 반환
    Map<String_dataset_name, CustomSettingName__c> mcs = CustomSettingName__c.getAll();
    
    CustomSettingName__c mc = CustomSettingName__c.getValues(data_set_name);

Hierarchy Custom Settings

    데이터 가져오기 -- 세트 값을 반환
    CustomSettingName__c mc = CustomSettingName__c.getOrgDefaults();
    
    CustomSettingName__c mc = CustomSettingName__c.getInstance(Profile_ID);
profile
메모장 :)

0개의 댓글