Adding javascript to an existing button

  • 1
  • Question
  • Updated 7 months ago
  • In Progress
I currently have a button in place that when clicked it runs a class. I'm looking to add to this button so once it's clicked it also creates a new record on a new object. How can I do that? The new object's name is "Kickbacks__c"

Here's what the button currently looks like:

var scModels = skuid.model.getModel('Application');
var scRow = scModels.data[0]; 
var result = sforce.apex.execute('DecisionLogicAPI','assignToUnderwriterQueue',
{   
        appId : scRow.Id
});
alert(result);
window.location.reload();
Photo of Edward Vazquez

Edward Vazquez

  • 70 Points

Posted 7 months ago

  • 1
Photo of Josh Lewis

Josh Lewis

  • 1,218 Points 1k badge 2x thumb
Hi Edward,

Are you familiar with the action framework within Skuid? You should be able to utilize the action framework to run multiple actions from a button. Our documentation on the Action Framework can be found here: https://docs.skuid.com/latest/en/skuid/action-framework/

-Josh