SHARE
TWEET

Untitled

a guest Feb 17th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--in component-->
  2. <lightning:workspaceAPI aura:id="workspace"/>
  3.  
  4. //in controller
  5. var workspaceAPI = component.find("workspace");
  6. workspaceAPI.isConsoleNavigation().then(function(response) {
  7.    if(response){
  8.       var focusedTabId = response.tabId;
  9.       workspaceAPI.closeTab({tabId: focusedTabId});
  10.    }
  11. });
  12. var createAcountContactEvent = $A.get("e.force:createRecord");
  13. createAcountContactEvent.setParams({
  14.    "entityApiName": "Account",
  15.    "recordTypeId": component.get("v.TypeOfRecord")
  16. });
  17. createAcountContactEvent.fire();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top