• Rahul Srivastava 44
  • NEWBIE
  • 0 Points
  • Member since 2018


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 4
    Replies
I have a requirement that I have to redirect to VF page on particular RecordType. If I choose record type 'Collection' then need to open VF page else for other recordtype open new button default functionality. I have done this but once I choose other Recordtypes, page is opening as by default and working good ('Save' and 'Save And New' ) button but once I click Cancel button it is not working as standard functionality. It not redirecting anywhere. I tried with putting home page redirect link in cancel functionality still not redirecting anywhere.
Please check my code where I am making mistake and help me!
 
public with sharing class TestRenewalActivityCollection {

private ApexPages.StandardController controller;
public String retURL {
    get;
    set;
}
public String saveNewURL {
    get;
    set;
}
public String rType {
    get;
    set;
}
public String cancelURL {
    get;
    set;
}
public String ent {
    get;
    set;
}
public String confirmationToken {
    get;
    set;
}
public String accountID {
    get;
    set;
}
public String contactID {
    get;
    set;
}

Public Id RenewalId {get;set;} 

public TestRenewalActivityCollection(ApexPages.StandardController controller) {

    this.controller = controller; 
    //retURL = ApexPages.currentPage().getParameters().get('retURL');
    rType = ApexPages.currentPage().getParameters().get('RecordType');
    cancelURL = 'https://***********partialcp.lightning.force.com/lightning/page/home';
    system.debug('***'+cancelURL);

    ent = ApexPages.currentPage().getParameters().get('ent');
    confirmationToken = ApexPages.currentPage().getParameters().get('_CONFIRMATIONTOKEN');
    saveNewURL = ApexPages.currentPage().getParameters().get('save_new_url'); 

    String retUrl = ApexPages.currentPage().getUrl().substringAfter('lkid'); 

    String RenewalId = String.isNOTBlank(retUrl) && retUrl.length() >= 16 ? retUrl.substring(1,16) : retUrl; 

    //system.debug('****'+parentId);

    //RenewalId = Id.valueOf(parentId);

    system.debug('****rType--'+RenewalId);

    //system.debug('***cancelURL'+cancelURL+'***ent'+ent+'**confirmationToken'+confirmationToken+'**saveNewURL'+saveNewURL+'');

}

public PageReference redirect() {

    PageReference returnURL;

    // Redirect if Record Type corresponds to custom VisualForce page

    IF(rType == '0120w000000Ah17AAC') {

        //returnURL = new PageReference('/apex/ActivityRenewalPage');

         PageReference pageref = new pagereference('/apex/ActivityRenewalPage');
           pageref.getParameters().put('recordID', RenewalId);
           pageref.setRedirect(true);
           return pageref;

    }

    ELSE { 
      returnURL = new PageReference('/a1K/e'); 
    }

    returnURL.getParameters().put('retURL', retURL);
    returnURL.getParameters().put('RecordType', rType); 
    returnURL.getParameters().put('cancelURL',cancelURL);
    returnURL.getParameters().put('ent', ent);
    returnURL.getParameters().put('_CONFIRMATIONTOKEN', confirmationToken);
    returnURL.getParameters().put('save_new_url', saveNewURL);
    returnURL.getParameters().put('nooverride', '1');

    returnURL.setRedirect(true);
    return returnURL;
} 
}

 
0
I am working in Avaya CTI - Salesforce integration. I am following some documents. I have followed the steps but 1 place I found to import [ Salesforce Call Centers can be created by importing and configuring the Call Center Definition (CCD) XML file into Salesforce. ]. This file is not present in that document. I have used other document of Avaya - SFDC configuration and found that XML file and followed the remaining steps. After installing this I can not see the dialpad on the screen. Some pop up is coming with error. please find below. 
User-added imagePlease let me know which XML file I should follow for these steps.
Please Help!
Hi All,
I have a requirements that I want to add Email Signature as image in mail. I have added my signature in 'My Email settings'. While sending email from opportunity I can see my image as signature but when I receive mail that image is not populating properly. Please find below signature task and let me know am I doing correct? 
User-added image
Hi All,

I am working on Group edition where I have a requirrement that I have to send a mail to user when some field update. But in Group edition we don't have workflow rule enabled and also we can't wrrite trigger. Please help me in this if we have any appexchange app or any other solution.

Please help!
 
I am working on Group edition. I have a requirement that I have to configure duplicate rule for Lead object but in this edition we don't have option to create duplicate/ matching rule also we can't write triggers. Please let me know if any other option we have or any app-exchange app we have for duplicate management in group edition.
Thanks!
Onclick 'New opportunity' button under the account. We see 'Account Name' field prepopulate as in images below.
User-added image

My requirement is while clicking lookup button for account selection. It should show only the existing account or user cannot change the current populating account. If a user selects another account it should throw error. How can we achieve this?
Hi All,
I have a requirements that I want to add Email Signature as image in mail. I have added my signature in 'My Email settings'. While sending email from opportunity I can see my image as signature but when I receive mail that image is not populating properly. Please find below signature task and let me know am I doing correct? 
User-added image
I am working on Group edition. I have a requirement that I have to configure duplicate rule for Lead object but in this edition we don't have option to create duplicate/ matching rule also we can't write triggers. Please let me know if any other option we have or any app-exchange app we have for duplicate management in group edition.
Thanks!
Onclick 'New opportunity' button under the account. We see 'Account Name' field prepopulate as in images below.
User-added image

My requirement is while clicking lookup button for account selection. It should show only the existing account or user cannot change the current populating account. If a user selects another account it should throw error. How can we achieve this?