You need to sign in to do that
Don't have an account?

how enable java script button code in Lightning
I have a below VF code for javascript button this is working in classic but in lightning it's not working , Please suggest me how to enable this code for Lightning.
<input type="button" value="New Program" class="btn" onClick="createNewProgram();" title="New Marketing Program record"/> function createNewProgram() { window.open('{!URLFOR($Action.Marketing_Programs__c.New)}', '_new'); }
https://developer.salesforce.com/blogs/developer-relations/2016/09/take-the-first-steps-ways-you-can-replace-javascript-buttons.html
The following code should work but may not open the the URL in a new window. I recomend checking out the Visualforce & Lightning Experience Trailhead Module (https://trailhead.salesforce.com/modules/lex_dev_visualforce) for more information on what I changed here. More specifily the 5th unit: "Manage Navigation (https://trailhead.salesforce.com/modules/lex_dev_visualforce/units/lex_dev_visualforce_navigation)".
Another option you can try which should open the URL in a new window is just to use an archor element or similar visualforce component You may need to adjust some css to make the link look more like a button