From fb04e7c01d119c60632b4298d18fd93f3ccb3d79 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期三, 06 四月 2022 10:32:05 +0800
Subject: [PATCH] 20220405DeployProduction
---
force-app/main/default/classes/NFM115ControllerTest.cls | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/classes/NFM115ControllerTest.cls b/force-app/main/default/classes/NFM115ControllerTest.cls
index 898a314..c711143 100644
--- a/force-app/main/default/classes/NFM115ControllerTest.cls
+++ b/force-app/main/default/classes/NFM115ControllerTest.cls
@@ -26,7 +26,11 @@
account2.Name = 'test1缁忛攢鍟�';
account2.RecordTypeId = '01210000000Qem1';
insert account2;
- ID AgencyID = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Office').getRecordTypeId();
+ Schema.RecordTypeInfo rti = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Office');
+ if(rti == null){
+ rti = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('office');
+ }
+ ID AgencyID = rti.getRecordTypeId();
Agency = new Account(ParentId = account2.Id, RecordTypeId = AgencyID, Name = 'NFM115TestAgency', FSE_SP_Main_Leader__c = UserInfo.getUserId(), FSE_GI_Main_Leader__c = UserInfo.getUserId());
insert Agency;
Agency = [select Management_Code__c, Management_Code_Auto__c, Name, Id from Account where Id = :Agency.Id];
@@ -55,7 +59,11 @@
account2.Name = 'test1缁忛攢鍟�';
account2.RecordTypeId = '01210000000Qem1';
insert account2;
- ID AgencyID = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Office').getRecordTypeId();
+ Schema.RecordTypeInfo rti = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Office');
+ if(rti == null){
+ rti = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('office');
+ }
+ ID AgencyID = rti.getRecordTypeId();
Agency = new Account(ParentId = account2.Id, RecordTypeId = AgencyID, Name = 'NFM115TestAgency', FSE_SP_Main_Leader__c = UserInfo.getUserId(), FSE_GI_Main_Leader__c = UserInfo.getUserId());
insert Agency;
Agency = [select Management_Code__c, Management_Code_Auto__c, Name, Id from Account where Id = :Agency.Id];
--
Gitblit v1.9.1