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

How can i convert a javascript button to something that is relaible in lightning?

I try to migrate this but i dont really know how  to do it 

if("{!Account.Bridger_check__c}" == "No"){ 
window.location = "/{!Account.Id}/e?retURL=%2F{!Account.Id}&RecordType=12313123"; 

window.location = "{!Account.Id}"; 
I tried to convert it to url but is not good. Any ideas ? 
Best Answer chosen by B
Khan AnasKhan Anas (Salesforce Developers) 

I trust you are doing very well.

You can use Lightning Experience Configuration Converter to convert JavaScript buttons to lightning. Please refer to the below links which might help you further with the above issue.

There are other options also to replace the javascript button in lightning. You can use Quick Actions, Custom Buttons, or Apex. Go through this trailhead module to understand the alternatives available:
Lightning Alternatives to JavaScript Buttons (

Also, Please refer to the below link:

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas