function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anupama JanteAnupama Jante 

salesforce lightning - custom clone url

Hi Folks,

We have a custom clone button on opportunity in classic to clone opportunity excluding some fields. 
The custom clone is implemented with url - '{!URLFOR($Action.Opportunity.Clone,Opportunity.Id,[retURL=URLFOR($Action.Opportunity.View, Opportunity.Id)],false)}...' through VF page.  We want to use the same functionality in lighting as well, but in lighting the same custom clone button is redirecting to classic clone page.  How do I change the url in VF page to open the lightning standard clone page .

Thanks in Advance.

-Anupama
sowmya Inturi 9sowmya Inturi 9
Hi Anupama,
You can create a Quick Action in lightning and give the values you want to populate in the pre-defined values.
This process do have some limitations. you cannot give picklist field values in Pre-defined section.

Thanks,
Sowmya.
Anupama JanteAnupama Jante
Hi Sowmya,
Thanks for the quick reply but this is not I am looking for :) .
Our requirement is something with optional pre define values
We have a custom clone button on Opportuntity, Onclick of that button a VF page is opened where the checkboxes are displayed for few field, if we select any checkbox, that field will be cloned else the field will be left blank. However this functionality is working fine in lightnigng, but the clone page view is showing in classic mode. How to redirect to opportunity clone page in lightning mode.

Currently in VF page I am using  the below url to redirect to clone page and appending with url parameters
urlString = '{!URLFOR($Action.Opportunity.Clone,Opportunity.Id,[retURL=URLFOR($Action.Opportunity.View, Opportunity.Id)],false)}' + ....

Thanks,
Anupama