/*
|
* 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);
|
}
|
|
}
|