-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateRecordForAccountController.js
More file actions
44 lines (31 loc) · 1.28 KB
/
CreateRecordForAccountController.js
File metadata and controls
44 lines (31 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
({
doInit : function(component, event, helper) {
var action = component.get('c.createRecord');
action.setParams({'lName' : component.get('v.lname'),
'Email__c' : component.get('v.email'),
'recId' : component.get('v.recordId')});
action.setCallback(this, function(a) {
var state = a.getState();
if (state === "SUCCESS") {
var name = a.getReturnValue();
component.set('v.showTable', false);
component.find("lastName").set("v.value", "");
component.find("Email").set("v.value", "");
}
});
$A.enqueueAction(action);
},
showTable : function(component, evt, help) {
component.set('v.showTable', true);
},
Close : function(component, event, helper) {
component.set('v.showTable', false);
},
closeModel : function (component, event, helper) {
component.set('v.isOpen', false);
},
openModel : function (component, event, helper) {
console.log('i m called');
component.set('v.isOpen', true);
}
})