buli
2022-05-13 2f4492ee18f90274582fcc2bb06f5e9bf64136e8
force-app/main/default/classes/NewCrossRegionalSalesController.cls
@@ -16,10 +16,6 @@
    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();
@@ -40,14 +36,12 @@
        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];//pi
        List<Contact> conList = [select Id, Name from Contact where Id = :conId];
        if (conList.size() > 0) {
            con = conList[0];
        }
@@ -145,10 +139,8 @@
            hasError = false;
            // String url = baseUrl + '\\' + opp.Id;
            // return new Pagereference(url);
            oppid = opp.id;
            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()));