From 0f1b20f505df9737ea21f8f4a4fe86b11d111807 Mon Sep 17 00:00:00 2001
From: 涂煌豪 <tuhuanghao@prec-tech.com>
Date: 星期二, 12 四月 2022 16:54:10 +0800
Subject: [PATCH] WLIG-CC78MX 【委托】NFM105接口增加OTS运单号字段

---
 force-app/main/default/classes/StraightBackAddressController.cls |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/StraightBackAddressController.cls b/force-app/main/default/classes/StraightBackAddressController.cls
index 45a9643..6a358f5 100644
--- a/force-app/main/default/classes/StraightBackAddressController.cls
+++ b/force-app/main/default/classes/StraightBackAddressController.cls
@@ -109,7 +109,11 @@
      * 寮�濮嬫柟娉�
      */
     public PageReference init(){
-        accOfficeTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Office').getRecordTypeId();
+        Schema.RecordTypeInfo recordTypeValue = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Office');
+        if(recordTypeValue == null){
+            recordTypeValue = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('office');
+        }
+        accOfficeTypeId = recordTypeValue.getRecordTypeId();
         accAgencyTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
         accAgencyContactTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('AgencyContact').getRecordTypeId();
         String RepairSql = makeTextRepairSql(RepairId);

--
Gitblit v1.9.1