| | |
| | | public String leadId{set;get;}//For Lead Lookup |
| | | public String staticResourceContact {get; set;} |
| | | public String staticResourceLead {get; set;} |
| | | public String urlCheckContactAWSid {get; set;} |
| | | public NewAndEditInquiryFormController(ApexPages.StandardController controller) { |
| | | List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('Inquiry_form__c').getDescribe().fields.getMap().keyset()); |
| | | // Add fields to controller. This is to avoid the SOQL error in visualforce page |
| | |
| | | staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')); |
| | | //Lead信息(搜索查询query url用) |
| | | staticResourceLead = JSON.serialize(PIHelper.getPIIntegrationInfo('Lead')); |
| | | |
| | | checkUrl('CF00N1000000962n8_lkid','Contact'); |
| | | } |
| | | |
| | | |
| | | @RemoteAction |
| | | global static Response saveInquiryForm(String leadJson,String transId,Boolean isNew) { |
| | | return save(new Inquiry_form__c(),leadJson,transId,isNew); |
| | | } |
| | | |
| | | private void checkUrl(String urlStr, String sobjType){ |
| | | Map<String, String> urlFieldMap = new Map<String, String>(); |
| | | urlFieldMap = ApexPages.currentPage().getParameters(); |
| | | if (urlFieldMap.containsKey(urlStr)) { |
| | | String sobjId = urlFieldMap.get(urlStr); |
| | | String soql = 'select id,AWS_Data_Id__c from ' + sobjType; |
| | | soql += ' where id=\'' + sobjId + '\''; |
| | | Sobject sobj = Database.query(soql); |
| | | |
| | | Map<String, String> m = new Map<String, String>(); |
| | | m.put((String)sobjId, (String)sobj.get('AWS_Data_Id__c')); |
| | | |
| | | LookUpOverrideFieldsMapJson = JSON.serialize(m); |
| | | } |
| | | } |
| | | } |