Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:component implements="force:lightningQuickAction, lightning:availableForFlowActions">
- <aura:attribute name="recordId" type="String" />
- </aura:component>
- <design:component label="Navigate to recordId">
- <design:attribute name="recordId" label="Record ID" />
- </design:component>
- ({
- invoke : function(component, event, helper) {
- // Get the record ID attribute
- var record = component.get("v.recordId");
- console.log('recordId: ' + record);
- // Get the Lightning event that opens a record in a new tab
- var redirect = $A.get("e.force:navigateToSObject");
- // Pass the record ID to the event
- redirect.setParams({
- "recordId": record,
- "slideDevName": "detail"
- });
- // Open the record
- redirect.fire();
- console.log('redirect fired.');
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement