Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <aura:component implements="force:lightningQuickAction, lightning:availableForFlowActions">
  2. <aura:attribute name="recordId" type="String" />
  3. </aura:component>
  4.  
  5. <design:component label="Navigate to recordId">
  6. <design:attribute name="recordId" label="Record ID" />
  7. </design:component>
  8.  
  9. ({
  10. invoke : function(component, event, helper) {
  11. // Get the record ID attribute
  12. var record = component.get("v.recordId");
  13. console.log('recordId: ' + record);
  14.  
  15. // Get the Lightning event that opens a record in a new tab
  16. var redirect = $A.get("e.force:navigateToSObject");
  17.  
  18. // Pass the record ID to the event
  19. redirect.setParams({
  20. "recordId": record,
  21. "slideDevName": "detail"
  22. });
  23.  
  24. // Open the record
  25. redirect.fire();
  26. console.log('redirect fired.');
  27. }
  28. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement