From 4420517bbbffea48cabe7a7dcdf2e1c4b440fc85 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期一, 30 五月 2022 16:15:26 +0800
Subject: [PATCH] 两个LS特殊条件在说明的增减
---
force-app/main/default/classes/NewCrossRegionalSalesController.cls | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/force-app/main/default/classes/NewCrossRegionalSalesController.cls b/force-app/main/default/classes/NewCrossRegionalSalesController.cls
index 5d756d6..eb16921 100644
--- a/force-app/main/default/classes/NewCrossRegionalSalesController.cls
+++ b/force-app/main/default/classes/NewCrossRegionalSalesController.cls
@@ -16,6 +16,10 @@
public Boolean isIEDealer{get; set; }
+ public String staticResource {get; set;}
+
+ public String oppid {get; set;}
+
public NewCrossRegionalSalesController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
String path = URL.getCurrentRequestUrl().getPath();
@@ -36,12 +40,14 @@
accId = System.currentPageReference().getParameters().get('accid');
conId = System.currentPageReference().getParameters().get('conId');
+ staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Opportunity'));
+
List<Account> accList = [select Id, Name, ProductSegment__c,compo_Acc__c,UserType__c from Account where Id = :accId];
if (accList.size() > 0) {
acc = accList[0];
}
- List<Contact> conList = [select Id, Name from Contact where Id = :conId];
+ List<Contact> conList = [select Id, Name from Contact where Id = :conId];//pi
if (conList.size() > 0) {
con = conList[0];
}
@@ -114,9 +120,9 @@
Savepoint sp = Database.setSavepoint();
try {
//娴嬭瘯鐜ID
- opp.RecordTypeId = '0120T0000002Vh9';
+ //opp.RecordTypeId = '0120T0000002Vh9';
//姝e紡鐜ID
- //opp.RecordTypeId = '0120K000000OpaG';
+ opp.RecordTypeId = '0120K000000OpaG';
opp.CrossCooperativeProject__c = true;
insert opp;
@@ -139,8 +145,10 @@
hasError = false;
- String url = baseUrl + '\\' + opp.Id;
- return new Pagereference(url);
+ // String url = baseUrl + '\\' + opp.Id;
+ // return new Pagereference(url);
+ oppid = opp.id;
+ return null;
} catch (Exception e) {
Database.rollback(sp);
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, e.getMessage()));
--
Gitblit v1.9.1