0

Can we use a visualforce page as a tab in service condole? If it is possible can you please explain the steps as well?

Thanks in advance

1 Answer 1

1

If I am understanding the question correctly. I think it is possible through Salesforce console integration toolkit.

Here http://www.salesforce.com/us/developer/docs/api_console/index_Left.htm#CSHID=sforce_api_console_sample_vf.htm|StartTopic=Content%2Fsforce_api_console_sample_vf.htm|SkinName=webhelp

Example is given to use visualforce page as tab and performing various operations on it.

Sample page copied from Salesforce console Integration toolkit guide

<apex:page standardController="Case">

   <apex:includeScript value="/support/console/20.0/integration.js"/>
   <script type="text/javascript">
        function openPrimaryTab() {
            sforce.console.openPrimaryTab(undefined, 
               'http://www.salesforce.com', true, 'salesforce');
        }

        //The callback function that openSubtab will call once it's got the ID for its primary tab
        var callOpenSubtab=function callOpenSubtab(result) {
            sforce.console.openSubtab(result.id, 
               'http://www.yahoo.com', true, 'yahoo');
        };

        function openSubtab() {
            sforce.console.getEnclosingPrimaryTabId(callOpenSubtab);
        }

        //Sets the title of the current tab to "SFDC"
        function setTitle() {
            sforce.console.setTabTitle('SFDC');
        }

        //The callback function that closeTab will call once it's got the ID for its tab
        var callCloseTab= function callCloseTab(result) {
            sforce.console.closeTab(result.id);
        }

        function closeTab() {
            sforce.console.getEnclosingTabId(callCloseTab);
        }
  </script>

   <A HREF="#" onClick="openPrimaryTab();return false">Open A Primary Tab</A> 
   <p/><A HREF="#" onClick="openSubtab();return false">Open A Subtab</A> 
   <p/><A HREF="#" onClick="setTitle();return false">Set Title to SFDC</A> 
   <p/><A HREF="#" onClick="closeTab();return false">Close This Tab</A> 

</apex:page>
2
  • does not work, it does not do anything get this error Uncaught ReferenceError: openSubtab is not defined
    – Nick
    Commented Mar 16, 2016 at 20:27
  • Did you add: <apex:includeScript value="/support/console/20.0/integration.js"/>? @NickKahn. It is a working example from official Salesforce documentation.
    – Ashwani
    Commented Mar 17, 2016 at 4:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .