You need to sign in to do that
Don't have an account?
Shane K 8
Overwrite New button with Visualforce page
Hello,
Is it possible to achieve this functionality?
I would like to override the standard New button with visualforce page, which I know is possible, but based on some criteria I want to call a either a custom lightning component or the standard New button functionality. I will be using a controller to check my criteria but want to know how to use the standard New button functionality if the criteria does not meet. How to leverage the standard New button functionality?
Thanks.
Is it possible to achieve this functionality?
I would like to override the standard New button with visualforce page, which I know is possible, but based on some criteria I want to call a either a custom lightning component or the standard New button functionality. I will be using a controller to check my criteria but want to know how to use the standard New button functionality if the criteria does not meet. How to leverage the standard New button functionality?
Thanks.
By default there is a way to mention that in lightning you can use lightning component and in classic you can mention to use visual force page.
Does this help?
Also, I would suggest you to have a look at the below link that mentions a way to conditionally render in visualforce page.
>> https://help.salesforce.com/articleView?id=000324662&type=1&mode=1
I hope this helps and in case if this comes handy can you please choose this as best answer so that it can be useful for others in the future.
Regards,
Anutej
There is a detail tag in the apex which you can use in your VF page if you want to show the standrad layout. Please see the VF page code below: Let me know if you have doubts .
Thanks,
Abhishek Bansal.