Created
May 15, 2019 18:23
-
-
Save choudharymanish8585/ed2d0f2f23432414804e4a15d089683d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
/** | |
* Get page reference and set record id, object name attribute | |
* @author Manish Choudhari | |
* */ | |
doInit: function(component, event, helper) { | |
//getting page reference from pageReference attribute supplied by lightning:isUrlAddressable interface | |
var myPageRef = component.get("v.pageReference"); | |
//get parameter from state | |
var recordId = myPageRef.state.c__recordId; | |
var objectName = myPageRef.state.c__objectName; | |
component.set("v.recordId", recordId); | |
component.set("v.objectName", objectName); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment