From 5ba06835141d1af5fa26a72055f1eee2fc8a4c52 Mon Sep 17 00:00:00 2001
From: liwentao <1376563863@qq.com>
Date: 星期一, 07 八月 2023 18:02:01 +0800
Subject: [PATCH] 营业 copy按钮

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

diff --git a/force-app/main/default/classes/lexCopyToBaseController.cls b/force-app/main/default/classes/lexCopyToBaseController.cls
index 49d7ecb..ca07eef 100644
--- a/force-app/main/default/classes/lexCopyToBaseController.cls
+++ b/force-app/main/default/classes/lexCopyToBaseController.cls
@@ -8,7 +8,6 @@
         String s='';
         try {
             String objectName = 'Opportunity'; // 瑕佽幏鍙栧瓧娈电殑瀵硅薄鍚�
-
             Map<String, Schema.SObjectType> globalDescribe = Schema.getGlobalDescribe();
             Schema.SObjectType objType = globalDescribe.get(objectName);
             if (objType != null) {
@@ -20,6 +19,7 @@
                     if(!fieldName.equals('id'))
                         s+=fieldName+',';
                 }
+
                 s=s.removeEnd(',');
                 s+=' FROM Opportunity where id=\''+recordId+'\'';
                 system.debug('SQL:'+s);
@@ -28,7 +28,7 @@
                 if(opportunitys.size()>0){
                     system.debug('in!');
                     for (String fieldName : fieldMap.keySet()) {
-                        String formaF=forma(fieldName);
+                        String formaF=fieldMap.get(fieldName).getDescribe().getName();
                         if(opportunitys.get(0).get(fieldName)!=null&&!opportunitys.get(0).get(fieldName).equals('null'))
                             s+=formaF+'='+opportunitys.get(0).get(fieldName)+',';
                     }
@@ -58,7 +58,6 @@
         List<Integer> charArr = new List<Integer>();
         Integer change=bA-a;
         Integer st=(str.charAt(0)+change);
-        //res+=String.valueOf(st);
         charArr.add(st);
         for(Integer i=0;i<str.length()-2;i++){
             Integer c=str.charAt(i);
@@ -67,7 +66,6 @@
                 nextC+=change;
             }
             charArr.add(nextC);
-            //res+=String.fromCharArray(List<Integer> charArr)(nextC);
         }
         res=String.fromCharArray(charArr);
         res+=str.substring(str.length()-1,str.length());

--
Gitblit v1.9.1