You need to sign in to do that
Don't have an account?
javascript in lightning
Hi Team,
Iam using javascript button on click custom button on lead object, when lead status is new need to redirect into a visualforce page with id.
below code is working in classic
how can i move it into lightning without using lightning component
any help :)
Thanks for advance
Iam using javascript button on click custom button on lead object, when lead status is new need to redirect into a visualforce page with id.
below code is working in classic
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")} var status = '{!Lead.Status}'; if (status != 'New') { alert('Please ensure this Lead is at the New Status prior generating the reservation form'); } else{ window.open('/apex/Downloadaspdf?retURL={!Lead.Id}&id={!Lead.Id}&noopptt={!Lead.LastName&", "&Lead.FirstName}'); }I have idea that javascript buttons will not work in lightning
how can i move it into lightning without using lightning component
any help :)
Thanks for advance
With Lightning you have to move this script to controller.js component inside your lightning component. Neither line 1 nor 2 are required to make it work. You should do some updates in your code to map the variables.
Please, let me know if this helps you.
Thanks
Regards,
Ignacio