From e14d6d0619330cad423f06493e3aa2371faa2a8f Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期六, 09 九月 2023 14:02:23 +0800
Subject: [PATCH] Sit期间修改

---
 force-app/main/default/classes/lexOpportunitySpecialApplyController.cls |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/lexOpportunitySpecialApplyController.cls b/force-app/main/default/classes/lexOpportunitySpecialApplyController.cls
index 492a60f..07bf24d 100644
--- a/force-app/main/default/classes/lexOpportunitySpecialApplyController.cls
+++ b/force-app/main/default/classes/lexOpportunitySpecialApplyController.cls
@@ -27,7 +27,18 @@
         update opp;
         return '';
     } catch (Exception e) {
-        return e.getMessage();
+        if (e.getMessage().contains(',')) {
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+            String exc = '' + e.getMessage();
+            Integer left = exc.indexOf(':') + 1;
+            Integer right = exc.lastIndexOf(':');
+            String str = exc.substring(left,right);
+            left = str.indexOf(',') +  1;
+            String newStr = str.substring(left);
+            return newStr;
+        }else {
+            return e.getMessage();   
+        } 
     }
    } 
     public class InitData{

--
Gitblit v1.9.1