Need help in converting a javaScript Button into lightning component button.
There is a JavaScript button, which I need to convert into lightning component button.
{!REQUIRESCRIPT("/xdomain/xdomain.js")}
{!REQUIRESCRIPT("/support/console/37.0/integration.js")}
{!REQUIRESCRIPT("/apex/VFPage1")}
VFPage1.showLoadingIndicator();
VFPage1.initRequest("../apex/VFPage2?accId={!Account.Id}&guid={!Account.customfield__c}",'StringValue', function(message) { alert(message); },"../{!Account.Id}");
VFPage1 page contentType="text/javascript" has custom javaScript functions in it
( showLoadingIndicator(), initRequest() etc...)
VFPage2 is communicating with Apex Class Controller methods. None of the controller methods are Static.
One of the method is calling the inhouse webservice using
Continuation con = new Continuation(InhouseService.WebserviceCalloutTimeout);
Hi @Mandy Rawat ,
Have you tried using Ligtning Experience Configuration Converter? In case you haven't here is the link and a link to some information about it:
-
https://lightning-configuration.salesforce.comhttps://lightning-configuration.salesforce.com-
https://admin.salesforce.com/lightning-experience-configuration-converterOn your case, since the button is very specific to your business logic, the tool will not be able to make a full conversion. However, it will build the basic structure of a lightning component so you can modify it to recreate the functionality of the original button and use it on a lightning component action.
Let us know if you need further assistance.