liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * Author: Zhang,Huajian
 * Created Date: 06/06/2023
 * Purpose: Utility class for describe layouts
 * Test Class: LexNewAndEditAgencyContactPIPLTest
 * History: 
 *      06/06/2023 - Zhang,Huajian - Initial Code.
 * 
 * */
public with sharing class LexNewAndEditAgencyContactPIPLController {
    public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    // 字段信息
    public static Map<string, SObjectField> fieldMap = new Map<string, SObjectField>();
 
    @AuraEnabled
    public static ResponseBodyLWC initData(Id rid, String recordTypeId, String sobjectType) {
        System.debug('enter LexNewAndEditAgencyContactPIPLController initData');
        ResponseBodyLWC res = new ResponseBodyLWC();
        Map<String, object> data = new Map<String, object>();
        res.entity = data;
        if (String.isBlank(recordTypeId)) {
            data.put('recordTypeId', LayoutDescriberHelper.getDefaultRecordType(sobjectType));
        }
        ResponseBodyLWC rbl = LexNewAndEditBasePIPLController.initData(rid, recordTypeId, sobjectType);
        data = (Map<String,Object>)rbl.entity;
        data.put('staticResourceContact', Json.serialize(PIHelper.getPIIntegrationInfo('Contact')));
        rbl.entity = data;
        return rbl;
    }
 
    @AuraEnabled
    public static ResponseBodyLWC queryAccount(String accountTypes, String accountId) {
        return LexNewAndEditBasePIPLController.queryAccount(accountTypes,accountId);
    }
 
    @AuraEnabled
    public static ResponseBodyLWC searchContactInit(String accountId, String searchKeyWord) {
        return  LexNewAndEditBasePIPLController.searchContactInit(accountId, searchKeyWord);
    }
    
}