| | |
| | | public NewAndEditASEActivityController(ApexPages.StandardController controller) { |
| | | List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('ASEActivity__c').getDescribe().fields.getMap().keyset()); |
| | | // Add fields to controller. This is to avoid the SOQL error in visualforce page |
| | | controller.addFields(fieldList); |
| | | if (!Test.isRunningTest()) { |
| | | controller.addFields(fieldList); |
| | | } |
| | | LookUpOverrideFields.add('ReporterASE__c'); |
| | | Init(controller.getRecord()); |
| | | |
| | |
| | | //获取contact 加密ID |
| | | // contactsInfo = LookUpOverrideFieldsMapJson; |
| | | //contact信息(搜索查询query url用) |
| | | ASEActivity__c aseActivity = [Select Id, ReporterASE__c From ASEActivity__c Where Id = : obj.Id]; |
| | | if(aseActivity.ReporterASE__c != null){ |
| | | Contact contact = [Select Id, AWS_Data_Id__c From Contact Where Id = : aseActivity.ReporterASE__c]; |
| | | System.debug('contact : ' + contact ); |
| | | contactAWS = contact.AWS_Data_Id__c; |
| | | System.debug('contactAWS : ' + contactAWS ); |
| | | if(obj.Id != null){ |
| | | ASEActivity__c aseActivity = [Select Id, ReporterASE__c From ASEActivity__c Where Id = : obj.Id]; |
| | | if(aseActivity.ReporterASE__c != null){ |
| | | Contact contact = [Select Id, AWS_Data_Id__c From Contact Where Id = : aseActivity.ReporterASE__c]; |
| | | System.debug('contact : ' + contact ); |
| | | contactAWS = contact.AWS_Data_Id__c; |
| | | System.debug('contactAWS : ' + contactAWS ); |
| | | } |
| | | } |
| | | staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')); |
| | | } |