1

I have a button called SUBMIT. When I click on this button It will open the Case record creation page with some specified values.

 PageReference RecPageRef = new PageReference(System.URL.getSalesforceBaseUrl().toExternalform()+'/500/e?retURL=%2F500%2Fo&cas4_lkid='+AccCase.id+'&cas4='+AccCase.name+'&CF00N1500000E0DE1_lkid='+OppCase.id+'&CF00N1500000E0DE1='+OppCase.name+'&RecordType='+RfiRecordId);       
    RecPageRef.setRedirect(true);  
  system.debug('%%%%%'+RecPageRef);        
  return RecPageRef;

When I click on SUBMIT it is returning return RecPageRef;. Which is Opening record creation page with some auto-populated values like a clone button. This working fine in Classic I am able to see auto-populated values in classic. But when I Click on this SUBMIT button in lightning, The auto-populated fields are not popping up. It is popping up record creation page without any values.

Can anyone please suggest me how to make this URL Based record creation page works in Lightning?

  • Why you don't use quick action functionality which will allow you to use pre-defined values for fields? URL hack is not supported in Lightning. Hence it is not working. – sanket kumar Feb 8 at 9:19
  • The submit button is in another VF Page called Newsurvey. We created a component for this NewSurvey page. So There is already quick action button we created. when we click on that quick action, it will open Newsurvey VF page. In that VF Page we have SUBMIT button. Don't know how to create component and embed into that SUBMIT button. If you have any idea please suggest me Sanket Kumar – chris Feb 8 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.