-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomAccountListController.js
55 lines (49 loc) · 1.74 KB
/
CustomAccountListController.js
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
45
46
47
48
49
50
51
52
53
54
55
({
loadAccountList : function(component, event, helper) {
// $A.get('e.force:refreshView').fire();
helper.getAccountList(component, event);
},
refreshView:function(component, event, helper) {
$A.get('e.force:refreshView').fire();
//helper.getAccountList(component, event);
},
deleteAccount: function(component, event, helper){
//alert('Inside controller >> deleteAccount');
helper.deleteAccount(component, event);
},
deleteSelected: function(component, event, helper){
var delId = [];
var getIds = component.find("checkbox");
if(! Array.isArray(getIds)){
if (getIds.get("v.value") == true) {
delId.push(getIds.get("v.text"));
}
}else{
for (var i = 0; i < getIds.length; i++) {
if (getIds[i].get("v.value") == true) {
delId.push(getIds[i].get("v.text"));
}
}
}
helper.deleteSelectedAccounts(component, event, delId);
},
editAccount : function(component, event, helper) {
var editRecordEvent = $A.get("e.force:editRecord");
//alert(event.target.id);
editRecordEvent.setParams({
"recordId": event.target.id
});
editRecordEvent.fire();
},
OnChangeInputCheckBox: function(component,event,helper){
//alert("controller method");
helper.passAccParamsToForm(component, event);
},
CreateNewAccount:function(component,event,helper){
var editRecordEvent = $A.get("e.force:createRecord");
editRecordEvent.setParams({
"entityApiName": "Account"
});
editRecordEvent.fire();
},
})