We are migrating to Lightning and I've hit a snag with creating a Lightning Action to replace a Javascript button that calls an Apex Class. The button is on a Custom Object called "Sales Order Processing" which is a child record of Opportunity.
The classic button is as follows:
{!REQUIRESCRIPT("/soap/ajax/31.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/31.0/apex.js")}
var url = parent.location.href;
sforce.apex.execute("SAASCreateObject","CreateSAAS",{oppId:"{!Sales_Order_Processing__c.Opportunity_ID__c}"});
parent.location.href = url;
This calls an Apex Class that creates a new Record on a Custom Object called SAAS, or updates an existing record if there is one. And it creates a new Case Record that references the newly created SAAS Record.
I tried the Convert Javascript converter but it didn't work. I tried contacting Support but they were stumped. So I'm reaching out here to see if anyone can help.
Thanks in advance!
Hi @David Flowers ,
I think this connection.js library not working with lightning component.
Similar question is answered here.
https://developer.salesforce.com/forums/?id=9060G000000MUg1QAG