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
No comments: