We need to convert some buttons to lightning quick actions to have on the lightning experience. I'm having a difficult time designing an adequate solution.
Current Button Functionality:
{!REQUIRESCRIPT("/soap/ajax/34.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/34.0/apex.js")}
var result = sforce.apex.execute("CloneObject","cloneQuote",
{
objectId:"{!Quote.Id}",
cloneAttachments: true
});
window.open(result + '/e?&retURL=' + result + '&saveURL=' + result);
This calls out to a piece of APEX code in a class called CloneObject and runs a method called cloneQuote. This is custom clone functionality because we would like to clone related objects as well.
Lightning Quick Action Functionality:
I ventured down the path of a VisualForce quick action, but it's unnecessary for a modal window to open. It just needs to be a button.
Is there an elegant quick action alternative for calling out to a piece of apex code?