Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--in component-->
- <lightning:workspaceAPI aura:id="workspace"/>
- //in controller
- var workspaceAPI = component.find("workspace");
- workspaceAPI.isConsoleNavigation().then(function(response) {
- if(response){
- var focusedTabId = response.tabId;
- workspaceAPI.closeTab({tabId: focusedTabId});
- }
- });
- var createAcountContactEvent = $A.get("e.force:createRecord");
- createAcountContactEvent.setParams({
- "entityApiName": "Account",
- "recordTypeId": component.get("v.TypeOfRecord")
- });
- createAcountContactEvent.fire();
Add Comment
Please, Sign In to add comment