Li Jun
2022-03-28 f5a94e721ae5a26f817f0df75065b64f1f192eb3
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
global class NewAndEditInspectionReportController extends NewAndEditBaseController 
{
    public NewAndEditInspectionReportController(ApexPages.StandardController controller) {
        
        List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('Inspection_Report__c').getDescribe().fields.getMap().keyset());  
        // Add fields to controller. This is to avoid the SOQL error in visualforce page
        if (!Test.isRunningTest()) { 
            controller.addFields(fieldList);
        }
        Init(controller.getRecord());
 
        //AWSToSobjectNonEncryptedMap.put('responsiblePersonHP', 'Responsible_Person__c');
        //AWSToSobjectNonEncryptedMap.put('technicianHP', 'Technician_HP__c');
        //AWSToSobjectNonEncryptedMap.put('callerPhone', 'phone__c');
 
        //AWSToSobjectEncryptedMap.put('responsiblePersonHPEncrypt', 'Responsible_Person_Encrypted__c');
        //AWSToSobjectEncryptedMap.put('technicianHPEncrypt', 'Technician_HP_Encrypted__c');
        //AWSToSobjectEncryptedMap.put('callerPhoneEncrypt', 'phone_Encrypted__c');
        //system.debug('layoutEncryptedAPIList');
    }
 
    
    @RemoteAction
    global static Response saveInspectionReport(String leadJson,String transId,Boolean isNew) {
        return save(new Inspection_Report__c(),leadJson,transId,isNew);
    }
}