| | |
| | | public String staticResourceContact {get; set;} |
| | | public String staticResourceLead {get; set;} |
| | | public String urlCheckContactAWSid {get; set;} |
| | | public String contactAWSDataId{set;get;} |
| | | public String contactName{set;get;} |
| | | 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 |
| | |
| | | if(obj.Id == null){ |
| | | //初始化加载值 |
| | | obj.put('OwnerId',UserInfo.getUserId()); |
| | | }else { |
| | | //联系人的Id |
| | | Inquiry_form__c ifc = [select Contact_Name__c from Inquiry_form__c where id=:obj.Id]; |
| | | if(ifc != null){ |
| | | List<Contact> c = [select AWS_Data_Id__c,Name from Contact where id=:ifc.Contact_Name__c]; |
| | | if(c.size()>0){ |
| | | if (c[0].AWS_Data_Id__c != null && c[0].AWS_Data_Id__c != '') { |
| | | contactAWSDataId = c[0].AWS_Data_Id__c; |
| | | }else { |
| | | contactName = c[0].Name; |
| | | } |
| | | } |
| | | }else { |
| | | contactAWSDataId = '无'; |
| | | contactName = '无'; |
| | | } |
| | | } |
| | | //contact信息(搜索查询query url用) |
| | | staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')); |