buli
2022-03-10 a90c9ecfc5118547d0a92b2fee2779eca95e09a5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
global without sharing class NewAndEditAgencyContactController extends NewAndEditBaseController 
{
    public string staticResourceContact{get;private set;}
    global NewAndEditAgencyContactController(ApexPages.StandardController controller) {
        
        List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('Agency_Contact__c').getDescribe().fields.getMap().keyset());  
        // Add fields to controller. This is to avoid the SOQL error in visualforce page
        controller.addFields(fieldList);
        LookUpOverrideFields.add('Contact__c');
        Init(controller.getRecord());
        PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Contact');
        staticResourceContact = JSON.serialize(piIntegration);
    }
 
    
    @RemoteAction
    global static Response saveContact(String leadJson,String transId,Boolean isNew) {
        return save(new Agency_Contact__c(),leadJson,transId,isNew);
    }
}