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
SeanOngSeanOng 

Case Icon URL

Hi Dev Experts!

I've created a Java Script button to set a Case (if it is a Sub Tab) to be opened as a "Primary Tab". It works perfectly except for the Icon on the Tab. When I run by code, the Briefcase Icon is as follows:
User-added image
Whereas the Case icon looks like this:
User-added image
In the code below, I'm using "/img/icon/cases16.png" to get the Case Icon. When I check the URL of the "Yellow Briefcase", I get /s.gif but when I open this directly, no images appear. Does anyone know the URL I should be using to get the "Yellow Briefcase"?
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}
{!REQUIRESCRIPT("/support/console/33.0/integration.js")}

var openSuccess = function openSuccess(result) {
  // Callback function of openPrimaryTab
  if (result.success == true) {
    //alert('Primary tab successfully opened');
    sforce.console.setTabIcon('/img/icon/cases16.png', result.id);
  } else {
    //alert('Primary tab cannot be opened');
  }
};

sforce.console.openPrimaryTab(null, "/{!Case.Id}", true, "{!Case.CaseNumber}", openSuccess);

 
ujwal thejaujwal theja
Hi,

I got your point, you want to access standard case icon in VF am I correct? Better use 'tab style' in apex page. This will work for you.
Or simply change case16 to case24 or case32. May be this will work, but how long it is going to work I am not sure.

Let me know it is working or not?


Thanks,
Ujwal K
SeanOngSeanOng
I want to do something different - in a Console, I created a button that will set a Subtab (Case) to become a Primary Tab. When this occurs, I want to set the Icon on the Primary Tab. Using case16, case24, case32 controls the size of the Icon but not the image.