From 69dc5df6ec51f6f7f6737c61d9c4c1e7757a2b96 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期四, 17 三月 2022 21:05:08 +0800
Subject: [PATCH] PIPLFixBugs0317V1
---
force-app/main/default/classes/NewAndEditContactController.cls | 62 +++++++++++++++++-------------
1 files changed, 35 insertions(+), 27 deletions(-)
diff --git a/force-app/main/default/classes/NewAndEditContactController.cls b/force-app/main/default/classes/NewAndEditContactController.cls
index 59c3e6e..87e1afe 100644
--- a/force-app/main/default/classes/NewAndEditContactController.cls
+++ b/force-app/main/default/classes/NewAndEditContactController.cls
@@ -15,35 +15,43 @@
unifiedIContactID = c.UnifiedI_Contact_ID__c;
}
- // AWSToSobjectNonEncryptedMap.put('lastName', 'LastName');
- // AWSToSobjectNonEncryptedMap.put('phone', 'Phone');
- // AWSToSobjectNonEncryptedMap.put('email', 'Email');
- // AWSToSobjectNonEncryptedMap.put('medicalStaffFullName', 'MedicalStaff_Full_name__c');
- // AWSToSobjectNonEncryptedMap.put('mobilePhone', 'MobilePhone');
- // AWSToSobjectNonEncryptedMap.put('title', 'Title');
- // AWSToSobjectNonEncryptedMap.put('olyAssistantType', 'OLY_Assistant_Type__c');
- // AWSToSobjectNonEncryptedMap.put('jobCategoryPicklist', 'Job_Category_picklist__c');
- // AWSToSobjectNonEncryptedMap.put('type', 'Type__c');
- // AWSToSobjectNonEncryptedMap.put('contactAddress', 'Contact_address__c');
- // AWSToSobjectNonEncryptedMap.put('contactType', 'ContactType__c');
- // AWSToSobjectNonEncryptedMap.put('doctorDivision1', 'Doctor_Division1__c');
- // AWSToSobjectNonEncryptedMap.put('uniqueNumber', 'UniqueNumber__c');
-
- // AWSToSobjectEncryptedMap.put('lastNameEncrypt', 'LastName_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('phoneEncrypt', 'Phone_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('emailEncrypt', 'Email_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('medicalStaffFullNameEncrypt', 'MedicalStaff_Full_name_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('mobilePhoneEncrypt', 'MobilePhone_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('titleEncrypt', 'Title_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('olyAssistantTypeEncrypt', 'OLY_Assistant_Type_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('jobCategoryPicklistEncrypt', 'Job_Category_picklist_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('typeEncrypt', 'Type_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('contactAddressEncrypt', 'Contact_address_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('contactTypeEncrypt', 'ContactType_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('doctorDivision1Encrypt', 'Doctor_Division1_Encrypted__c');
- // AWSToSobjectEncryptedMap.put('uniqueNumberEncrypt', 'UniqueNumber_Encrypted__c');
+ }
+
+ PageReference RedirectStandardPage(){
+ Map<string,string> mso = ApexPages.currentPage().getParameters();
+ system.debug(mso);
+ mso.remove('sfdc.override');
+ PageReference pg = new PageReference('/003/e');
+ mso.putAll(mso);
+ pg.getParameters().put('nooverride','1');
+ pg.setRedirect(true);
+ return pg;
}
+ 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'){
+ return RedirectStandardPage();
+ }
+ }
+ string accid = ApexPages.currentPage().getParameters().get('accid');
+ if(!string.isBlank(accid)){
+ List<Account> accs = [select RecordType.DeveloperName from account where id = :accid];
+ if(accs.size()>0){
+ s = accs[0].RecordType.DeveloperName;
+ if(s == 'Office' || s == 'AgencyContact' || s == 'Agency'){
+ return RedirectStandardPage();
+ }
+ }
+
+
+ }
+ return null;
+ }
@RemoteAction
global static Response saveContact(String leadJson,String transId,Boolean isNew) {
--
Gitblit v1.9.1