From 9b197b7fac92278fb591ea8f4942c7d5687cb5ce Mon Sep 17 00:00:00 2001
From: 李金换 <lijinhuan@prec-tech.com>
Date: 星期一, 28 三月 2022 18:01:22 +0800
Subject: [PATCH] LJPH-C8FB4P【委托】配合PBI设备覆盖率的数据准备0328
---
force-app/main/default/classes/NewAndEditContactController.cls | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/classes/NewAndEditContactController.cls b/force-app/main/default/classes/NewAndEditContactController.cls
index 5df7aa7..b87b107 100644
--- a/force-app/main/default/classes/NewAndEditContactController.cls
+++ b/force-app/main/default/classes/NewAndEditContactController.cls
@@ -13,15 +13,28 @@
Contact c = [select UnifiedI_Contact_ID__c from Contact where Id =:contactId ];
system.debug('Contact c = '+c);
unifiedIContactID = c.UnifiedI_Contact_ID__c;
+ }else{
+ Map<string,string> mso = ApexPages.currentPage().getParameters();
+ system.debug('mso='+mso);
+ if(mso.containsKey('con4_lkid')){
+ controller.getRecord().put('AccountId',mso.get('con4_lkid'));
+ }
}
+ system.debug('controller.getRecord()='+controller.getRecord());
}
PageReference RedirectStandardPage(){
Map<string,string> mso = ApexPages.currentPage().getParameters();
system.debug(mso);
+ PageReference pg = null;
mso.remove('sfdc.override');
- PageReference pg = new PageReference('/003/e');
+ system.debug('recordId='+recordId);
+ if(string.isBlank(recordId)){
+ pg = new PageReference('/003/e');
+ }else{
+ pg = new PageReference('/'+recordId+'/e');
+ }
//pg.getParameters().putAll(mso);
pg.getParameters().put('RecordType',mso.get('RecordType'));
pg.getParameters().put('accid',mso.get('accid'));
@@ -33,7 +46,6 @@
public PageReference PageLoad(){
system.debug('rtTypeId='+rtTypeId);
string s = null;
-
if(!string.isBlank(rtTypeId)){
s = Schema.SObjectType.Contact.getRecordTypeInfosById().get(rtTypeId).getDeveloperName();
if(s == 'Agency' || s == 'Internal_staff'){
@@ -52,6 +64,7 @@
}
+ system.debug('null');
return null;
}
--
Gitblit v1.9.1