We have a Custom Javascript button on the case object which looks like below
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
var caseObj = new sforce.SObject("Case");
caseObj.Id = '{!Case.Id}';
caseObj.OwnerId = 'xyz000111222';
var result2 = sforce.connection.update([caseObj]);
if (result2[0].success=='true') {
var caseCmt = new sforce.SObject("CaseComment");
caseCmt.ParentId = '{!Case.Id}';
caseCmt.CommentBody = 'Passing Customer Service for resolution';
var result1 = sforce.connection.create([caseCmt]);
if (result1[0].success=='false') {
alert(result1[0].errors);}
else {location.reload(true);}}
else{alert(result2[0].errors);}
I am new to SalesForce and trying to learn how to convert the button in to Ligthning component. I tried running the Lightning Experience Configuration Converter and I got the button partially converted and this is what I see
<aura:component extends="c:LCC_GenericLightningComponent" >
<aura:set attribute="partially" value="false"></aura:set>
<aura:set attribute="isAdditionalObject" value="false"></aura:set>
<!-- User Interface -->
<div class="slds-scrollable slds-p-around_medium slds-text-heading_small" id="modal-content-id-1">
<p class="slds-hyphenate" style="height: 6.75rem;"><a style="outline: 0;" href="https://github.com/developerforce/LEXComponentsBundle" target="_blank">Sample Lightning Component Action</a></p>
<br/>
</div>
<div class="slds-modal__footer">
<lightning:button class="slds-button_brand" onclick="{!c.accept}" label="Accept"/>
</div>
<!-- The height of the modal is defined in Salesforce, when you create the new action. -->
<!-- Recommended height size: 250px -->
</aura:component>
And the controller
({
accept : function(component, event, helper) {
$A.get("e.force:closeQuickAction").fire();
}
})
Can anyone please let me know what is the next step to approach this.