buli
2022-05-13 2f4492ee18f90274582fcc2bb06f5e9bf64136e8
force-app/main/default/classes/NewHighProductsOppController.cls
@@ -14,10 +14,6 @@
   public String ProductSegment { get; set; }
   public String staticResource {get; set;}
   public String oppid {get; set;}
   public NewHighProductsOppController() {
      baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
      String path = URL.getCurrentRequestUrl().getPath();
@@ -37,7 +33,6 @@
      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) {
@@ -65,7 +60,7 @@
      opp.AccountId = acc.Id;
      opp.Account = acc;
      opp.ProductSegment__c = acc.ProductSegment__c;
      opp.Type = 'Not Traget';
      opp.Type = '非目标';
      opp.SalesChannel__c = 'dealer';
      opp.NewInquiryDate__c = Date.today();
      opp.StageName = 'Prospect Created';
@@ -108,10 +103,9 @@
         insert ocr;
         hasError = false;
         oppid = opp.id;
         // String url = baseUrl + '\\' + opp.Id;
         // return new Pagereference(url);
         return null;
         String url = baseUrl + '\\' + opp.Id;
         return new Pagereference(url);
      } catch (Exception e) {
         Database.rollback(sp);
         ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, e.getMessage()));