Useful code snippets in lightning
Application event firing:
var nextEvent = $A.get("e.c:NextToShipmentPage");
nextEvent.fire();
Component event firing:
var chooseEvent = component.getEvent("lookupSelect");
chooseEvent.setParams({
"recordId" : component.get("v.record").id,
"recordName":component.get("v.record").formattedStr
});
chooseEvent.fire();
Label in JavaScript code if your org has a namespace
$A.get("$Label.namespace.labelName")
Accessing user information without apex code
var userId = $A.get("$SObjectType.CurrentUser.Id");
e.force:navigateToComponent
Useful code snippets in lightning
Reviewed by Rajendar Bommidi
on
October 29, 2019
Rating: 5