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
KattyKatty 

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.

Thanks,
Nagendra
Vinod ChoudharyVinod Choudhary
Hi Katty,

The Lightning Experience doesn't support onclick JavaScript buttons.  you can Upvote for the idea.
https://success.salesforce.com/ideaView?id=08730000000cGX8AAM

OR
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 

http://www.bayforce.com/2017/05/converting-javascript-button-for-lightning-experience-part-1/

Hope It Helps..!

Mark my solution as the best answer if it helps you

Thanks
Vinod


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