You need to sign in to do that
Don't have an account?
Dippan Patel
Close Previous tab in Console using javascript
Hi All,
I am using visualforce page in lightning for creating a new record. In case of Lightning Console, the record gets saved and open up in a new tab, the current tab with the create record visualforce page remains as it is.
Here is my sample code:
How do I close the current tab before the new tab is open? I tried salesforce's console - closeTab() but it doesn't seem to be working.
Thank you!
I am using visualforce page in lightning for creating a new record. In case of Lightning Console, the record gets saved and open up in a new tab, the current tab with the create record visualforce page remains as it is.
Here is my sample code:
<apex:commandButton action="{!customsave}" value="save" onComplete = "testmethod();"> testmethod(){ //get the record Id (format: "/recordid") sforce.one.navigateToURL(recordid); }
How do I close the current tab before the new tab is open? I tried salesforce's console - closeTab() but it doesn't seem to be working.
Thank you!
Anudeep (Salesforce Developers)
Can you try the following code?. I don't think there isn't any alternative to closeTab() other than window.close() javascript method