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
Kai Wifi AmundsenKai Wifi Amundsen 

Are the options for pagereferences in Lighting Console documented anywhere?

We are using Lightning Service Console and have some Legacy Visualforce pages that override record views. I am trying to use the Lighting Console Toolkit to detect if one of these pages is open in a console subtab, and if so, focus it instead of opening a duplicate subtab.

My problem is that the pagereference returned is not of a documented format (as listed here https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_navigation_page_definitions.htm?search_text=pagereference ). We are getting a page reference type of standard__directCmpReference

1) Is this type documented somewhere else? Like maybe it is a valid return type but you aren't alowed to create it?
2) Is it safe to use it for checking if my VF page is open or will the format of the pagereference change out from under me causing the code to fail to detect it?
Deepali KulshresthaDeepali Kulshrestha
Hi Kai,

Salesforce has provided all the information regarding the options for page references in Lighting Console.
Please refer to the following links as they may help in solving your problem:

https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_lightning_open_pagereference.htm
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_navigation_page_definitions.htm

You can also refer to the following link in order to discover more about it:
https://jenwlee.wordpress.com/2018/12/31/spring-19-salesforce-lightning-experience-highlights/

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha