+ Start a Discussion

Need to create a custom button in lightning which is in classic "Onclick javascript".

Hi,  I am trying to create a custom button on cases to click if they want to accept the case.  Which would change status of the case from new to open.This button already exists in classic in java script. Now need to create in Lightning. Please do help me.
NagendraNagendra (Salesforce Developers) 
Hi Katty,

The Lightning Experience doesn't support Onclick JavaScript buttons. These custom buttons are easy to spin up and extremely handy to conditionally redirect users to new pages. I've made use of them in Salesforce Classic for several years now and was disappointed to hear that they are not supported by Lightning.

I would suggest you, please . upvote for the below idea which is active on the success community so that it will be available in the mere future. Also, see the below trailhead which might help. Hope this helps.

Kindly mark this as solved if my reply was helpful.

Vinod ChoudharyVinod Choudhary
Hi Katty,

The Lightning Experience doesn't support onclick JavaScript buttons.  you can Upvote for the idea.

You can give a try :https://developer.salesforce.com/blogs/developer-relations/2016/09/take-the-first-steps-ways-you-can-replace-javascript-buttons.html 


Hope It Helps..!

Mark my solution as the best answer if it helps you


Hey, Thanks for the support. But I need the Logic for this scenario. Can anyone write the code for me?