From a9baff8a4508c1850e650f68831d857b953eace4 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期一, 16 五月 2022 16:59:25 +0800
Subject: [PATCH] 合同批准后拆分,打印pdf带出套装
---
force-app/main/default/classes/NewCrossHighOpportunityController.cls | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/force-app/main/default/classes/NewCrossHighOpportunityController.cls b/force-app/main/default/classes/NewCrossHighOpportunityController.cls
index bcd3267..815d013 100644
--- a/force-app/main/default/classes/NewCrossHighOpportunityController.cls
+++ b/force-app/main/default/classes/NewCrossHighOpportunityController.cls
@@ -14,6 +14,10 @@
public String ProductSegment { get; set; }
+ public String staticResource {get; set;}
+
+ public String oppid {get; set;}
+
public NewCrossHighOpportunityController() {
baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
String path = URL.getCurrentRequestUrl().getPath();
@@ -33,6 +37,8 @@
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,OwnerID__c from Account where Id = :accId];
if (accList.size() > 0) {
@@ -91,9 +97,9 @@
Savepoint sp = Database.setSavepoint();
try {
//娴嬭瘯鐜Id
- opp.RecordTypeId = '0120T0000002kYL';
+ //opp.RecordTypeId = '0120T0000002kYL';
//姝e紡鐜id
- //opp.RecordTypeId = '0120K000000OpaH';
+ opp.RecordTypeId = '0120K000000OpaH';
opp.CrossCooperativeProject__c = true;
opp.CrossCooperativeProjectL__c = true;
@@ -108,8 +114,10 @@
hasError = false;
- String url = baseUrl + '\\' + opp.Id;
- return new Pagereference(url);
+ oppid = opp.id;
+ // String url = baseUrl + '\\' + opp.Id;
+ // return new Pagereference(url);
+ return null;
} catch (Exception e) {
Database.rollback(sp);
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, e.getMessage()));
--
Gitblit v1.9.1