From 50ce6a5e5ae7ac6ce3e6281acca9a0db568306e6 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期三, 23 八月 2023 14:54:59 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/classes/NewLeadFromContact2.cls | 40 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/NewLeadFromContact2.cls b/force-app/main/default/classes/NewLeadFromContact2.cls
new file mode 100644
index 0000000..e6deeab
--- /dev/null
+++ b/force-app/main/default/classes/NewLeadFromContact2.cls
@@ -0,0 +1,40 @@
+public without sharing class NewLeadFromContact2 {
+ @AuraEnabled
+ public static InitData NewLeadFromContact2(String recordId) {
+ InitData res = new initData();
+ try{
+ Contact report= [SELECT Id,Name,AccountId,AWS_Data_Id__c FROM Contact WHERE Id = :recordId LIMIT 1];
+ res.Id = report.Id;
+ res.Name = report.Name;
+ res.AccountId = report.AccountId;
+ res.AWSDataId = report.AWS_Data_Id__c;
+ Account acc = [SELECT Id,Name,Department_Class__c FROM Account WHERE id =: report.AccountId];
+ res.accountIds = acc.Id;
+ res.accountName = acc.Name;
+ res.accountDepartmentClass = acc.Department_Class__c;
+ res.NewDailyReport = Schema.SObjectType.Lead.getRecordTypeInfosByDeveloperName().get('NewDaily_Report').getRecordTypeId();
+ System.debug(LoggingLevel.INFO, '*** xu: ' + res);
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** xu: ' + e);
+ }
+ return res;
+ }
+ public class InitData{
+ @AuraEnabled
+ public String Id;
+ @AuraEnabled
+ public String Name;
+ @AuraEnabled
+ public String AccountId;
+ @AuraEnabled
+ public String accountIds;
+ @AuraEnabled
+ public String accountName;
+ @AuraEnabled
+ public String accountDepartmentClass;
+ @AuraEnabled
+ public String NewDailyReport;
+ @AuraEnabled
+ public String AWSDataId;
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.1