Skip to content

Instantly share code, notes, and snippets.

@karanrajs
Created September 25, 2017 01:37
Show Gist options
  • Save karanrajs/26b805c1d731bd3d225e1e38d13214f4 to your computer and use it in GitHub Desktop.
Save karanrajs/26b805c1d731bd3d225e1e38d13214f4 to your computer and use it in GitHub Desktop.
handleSelect : function (component, event, helper) {
var stepName = event.getParam("detail").value;
component.set("v.picklistField.status",stepName);
component.find("record").saveRecord($A.getCallback(function(saveResult) {
if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") {
component.find('notifLib').showToast({
"variant": "success",
"message": "Record was updated sucessfully",
"mode" : "sticky"
});
} else {
component.find('notifLib').showToast({
"variant": "error",
"message": "Unfortunately, there was a problem updating the record.",
"mode" : "sticky"
});
}
}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment