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
praveen jha 42praveen jha 42 

Not able to see JavaScript classic button in Lightning-Very Very Urgent

I have requirement where I have to replicate a javascript button for Lightning version. As we know, we cannot have Javascript button in Lightning. I'd like to have the same button in Lightning version. Below is the Javascript code for the button in Classic version. Lightning Configuration Converter is not convert fully .it's convert partially.
Please provide step by step solutions for below code

Any help is appreciated!

Many Thanks!


{!REQUIRESCRIPT("/soap/ajax/39.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/39.0/apex.js")} 


if("{!$Profile.Name}" == "System Administrator") 


if (confirm("Are you sure you want to Create an Account in Oracle?") == true) 


var acctObj = new sforce.SObject("Account"); 
acctObj.Id = '{!Account.Id}'; 

acctObj.Create_Account_in_Oracle__c = true; 

var result = sforce.connection.update([acctObj]); 

if (result[0].success=='false') 

alert(result[0].errors.message); 

else 

alert("Account Creation Process has been submitted to Oracle"); 
window.parent.location.href="/{!Account.Id}"; 



}
Raj VakatiRaj Vakati

The Lightning Experience doesn't support onclick JavaScript buttons.  


https://success.salesforce.com/ideaView?id=08730000000cGX8AAM


You can't. Javascript buttons aren't supported by Lightning. Lightning pages are single page applications.  SO you need to create a quick actions 


Use the Lightning Experience Configuration Converter recreates your org’s JavaScript buttons as Lightning components, quick actions, or other solutions — all without touching your original buttons.


https://developer.salesforce.com/blogs/2018/06/convert-javascript-buttons-to-lightning-friendly-alternatives-with-the-lightning-experience-configuration-converter.html

https://lightning-configuration.salesforce.com/

http://sfdcmonkey.com/2017/04/16/add-lightning-component-lightning-action/
praveen jha 42praveen jha 42
Not helpful lightning configuration convertor does partially convert not fullu