-
-
Save arun12209/3608641dbe158c69cac3a0935933c0c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
handleDestroy : function (component, event, helper) { | |
var val = event.getParam("value"); | |
// Do something else here | |
var action = component.get("c.clearData"); | |
action.setParams({ | |
recId : component.get("v.recordId") | |
}); | |
// Create a callback that is executed after | |
// the server-side action returns | |
action.setCallback(this, function(response) { | |
var state = response.getState(); | |
if (state === "SUCCESS") { | |
// Alert the user with the value returned | |
// from the server | |
console.log("From server: " + response.getReturnValue()); | |
// You would typically fire a event here to trigger | |
// client-side notification that the server-side | |
// action is complete | |
} | |
}); | |
$A.enqueueAction(action); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment