-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPropertySummaryController.js
39 lines (31 loc) · 1.26 KB
/
PropertySummaryController.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
({
/*
When a new Property is selected (in another component), load the corresponding
property record.
*/
recordChangeHandler: function (component, event) {
var logger = component.find('logger');
logger.info('recordChangeHandler: property=' + component.get("v.property"));
component.set("v.recordId", event.getParam("recordId"));
var service = component.find("service");
service.reloadRecord();
},
editRecord: function (component, event, helper) {
var logger = component.find('logger');
var recordId = component.get("v.recordId")
logger.info('editRecord: recordId=' + recordId);
var editRecordEvent = $A.get("e.force:editRecord");
editRecordEvent.setParams({
"recordId": recordId
});
editRecordEvent.fire();
},
navigateToBrokerRecord : function(component, event) {
var logger = component.find('logger');
var brokerId = component.get("v.property").Broker__r.Id;
logger.info('navigateToBrokerRecord: brokerId=' + brokerId);
var navigateEvent = $A.get("e.force:navigateToSObject");
navigateEvent.setParams({"recordId": brokerId, slideDevName: "detail"});
navigateEvent.fire();
}
})