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

How to use Lightning Component to Replace Javascript Button
HI Friends,
I got stricked please do help.
We have custom execute javascript button which used to call third party api and using in classic mode. but now we moved to communities so now we are unable to show javascript button on communities pages. because lightning pages not supporting for javascrript buttons.
Please do help with lightning componenets and vf how to do, because am not familier with lightning.
Please do help.
Currently we have this java script button
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
var result = sforce.apex.execute("GeneratingNewDocLinkForLoanInDB","GeneratingDocLink", {extrnlid:"{!Loan__c.Loan_External_id__c}"});
location.reload();
Thanks in Advance.
1 - Object -> Custom, Button and Links Section ->New Action
2- Create a custom component having a button which would call your apex code.Your Custom Component can be a Custom Visualforce of Lightning Component (in Action Type while creating a Quick Action).
Please Refer the below link for more information
https://salesforce.stackexchange.com/questions/169021/javascript-button-on-lightning-experience
his page has an error. You might just need to refresh it.
Action failed: c:Generatedocslinks$controller$Generatedocslinks [sforce is not defined]
Failing descriptor: {c:Generatedocslinks$controller$Generatedocslinks}
Component Controller
Please do help
output
That is not the correct way to call apex
Please Refer the below pattern to call your server side controller