| | |
| | | public String PIPL_Input_Account_Error_Msg{set;get;} |
| | | public String contactId{set;get;}//For Lookup field |
| | | public String staticResourceContact {get; set;} |
| | | public String contactAWSDataId{set;get;} |
| | | public String contactName{set;get;} |
| | | public String endUserDAWSDataId{set;get;} |
| | | public String endUserDName{set;get;} |
| | | public NewAndEditOrderController(ApexPages.StandardController controller){ |
| | | |
| | | |
| | |
| | | if(obj.Id == null){ |
| | | //初始化加载值 |
| | | obj.put('OwnerId',UserInfo.getUserId()); |
| | | } else { |
| | | //联系人的Id |
| | | Order order = [select EndUser__c, EndUserD__c from Order where id=:obj.Id]; |
| | | System.debug('order: ' + order); |
| | | if(order != null){ |
| | | if (order.EndUser__c != null) { |
| | | List<Contact> contact = [select AWS_Data_Id__c,Name from Contact where id=:order.EndUser__c]; |
| | | if(contact.size()>0){ |
| | | if (contact[0].AWS_Data_Id__c != null && contact[0].AWS_Data_Id__c != '') { |
| | | contactAWSDataId = contact[0].AWS_Data_Id__c; |
| | | }else { |
| | | contactName = contact[0].Name; |
| | | } |
| | | } |
| | | } |
| | | if (order.EndUserD__c != null) { |
| | | List<Contact> contact = [select AWS_Data_Id__c,Name from Contact where id=:order.EndUserD__c]; |
| | | if(contact.size()>0){ |
| | | if (contact[0].AWS_Data_Id__c != null && contact[0].AWS_Data_Id__c != '') { |
| | | endUserDAWSDataId = contact[0].AWS_Data_Id__c; |
| | | }else { |
| | | endUserDName = contact[0].Name; |
| | | } |
| | | } |
| | | } |
| | | }else { |
| | | contactAWSDataId = '无'; |
| | | contactName = '无'; |
| | | } |
| | | } |
| | | //contact信息(搜索查询query url用) |
| | | staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')); |
| | | |
| | | } |
| | | |
| | | |