You need to sign in to do that
Don't have an account?
Ebrahim Abdulsattar
Lighting component workaround to replace Javascript button
Hello and thank you for your assistance in advance! I have a simple Javascript button that isn't working in Lighting, so I would apprecaite any help I get to make it work in my org.
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")} var result = sforce.apex.execute("WebServices_Batch","ApproveAllTransactions",{batchId: '{!Batch__c.Id}' }); if(result == 'SUCCESS'){ window.location.reload(); } else if(result == 'BatchAmountMismatch'){ alert('There is still a balance remaining for this batch'); } else{ alert('There was an error updating. Please contact your administrator.'); }
https://developer.salesforce.com/blogs/2018/06/convert-javascript-buttons-to-lightning-friendly-alternatives-with-the-lightning-experience-configuration-converter.html
https://admin.salesforce.com/lightning-experience-configuration-converter
https://trailhead.salesforce.com/content/learn/modules/lex_javascript_button_migration/lex_javascript_button_migration_intro
https://developer.salesforce.com/forums/?id=9060G000000MVV9QAO
https://www.ankittaneja.net/replacing-onclick-javascript-button-with-lightning-component/
http://astreait.com/Custom_Button_OnClick_JavaScript_through_Lightning_Components/
https://sompaul2012.wordpress.com/2018/04/05/lightning-action-as-a-replacement-of-javascript-button/
https://help.salesforce.com/articleView?id=lcc_javascript_buttons_overview.htm&type=5