/* * Author: Tan,Junfeng * Created Date: 08/07/2023 * Purpose: Utility class for describe layouts * Test Class: LexNewAndEditLeadPIPLControllerTest * History: * 08/07/2023 - Tan,Junfeng - Initial Code. * * */ public with sharing class LexTenderinformationPIPLController { public static Map schemaMap = Schema.getGlobalDescribe(); // 字段信息 public static Map fieldMap = new Map(); @AuraEnabled public static ResponseBodyLWC initData(Id rid, String recordTypeId, String sobjectType) { System.debug('enter LexTenderinformationPIPLController initData'); ResponseBodyLWC res = new ResponseBodyLWC(); Map data = new Map(); res.entity = data; ResponseBodyLWC rbl = LexNewAndEditBasePIPLController.initData(rid, recordTypeId, sobjectType); if(rbl.status == 'Error'){ return rbl; } if(!Test.isRunningTest()){ data = (Map)rbl.entity; } if (String.isBlank(recordTypeId) && String.isBlank(rid)) { data.put('recordTypeId', LayoutDescriberHelper.getDefaultRecordType(sobjectType)); } 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); } }