function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDC Forum 9SFDC Forum 9 

sforce.console.getEnclosingPrimaryTabId() returning undefined in lightning

sforce.console.getEnclosingPrimaryTabId(closeTab);

var closeTab= function closeTab(result){
var a=result.id;
console.log(a) ; 
// in console, i get expected value in classic app
// same code gives null value in lightning
}


I understood somewhat from blogs that this does not support in lightning, am i correct.If yes, can you help me with alternative
I got to migrate the vf page, it has aroung 2-3k lines of code.

Only these liness are not supportable in lightning, so definitely, its difficult  create lightning component, please assist.
AnudeepAnudeep (Salesforce Developers) 
Hi, 

getEnclosingPrimaryTabId() is not available for lightning experience. You can try using getEnclosingTabId() for Lightning Experience instead

Anudeep
SFDC Forum 9SFDC Forum 9
Anudeep, someho I need it to get it through vf code, is it possible to use lightning java script methods in vf code?