Skip navigation
Share This:

Some Background Info:

 

Inspired by this idea Open records in respective console when select "Recent Items" list and discussion aroundIncident and Task Consoles and how to ensure any URLs (e.g., from search results, recently viewed, look up fields, etc) to an incident, task, problem, change request, release, etc appear in the console rather than the standard Salesforce tabs. The solution is fairly simple and straight forward, create a visualforce page per object type (incident, problem, etc) that inspects url parameter then redirects to the console page.

 

What we'll be doing in this setup:

 

  1. Create one (1) visualforce page per object type (incident, problem, etc) with javascript to redirect to console page
  2. Customize the incident object (or problem, etc) to override the default view, edit, and new actions to open our new visualforce page

 

Step 1: Create Visualforce Pages

 

You will need to create a visualforce page for each object (incident, problem, etc) whose standard salesforce urls should redirect to the Remedyforce Console. I provide the setup for Incidents, Problems, and Change Requests below. Note in the <apex:page> tag that we turn off the header, sidebar, stylesheets, and chat. This is for performance improvements so that we reduce as much 'overhead' as we can so the redirect occurs as quickly as possible.

 

  1. Go to Setup | Develop | Pages
  2. Click New button
  3. Copy the below code and configurations
  4. Save page
  5. Repeat steps 1-4 for each object (incident, problem, change, etc.)

 

Incident Page Redirect

 

Label: BMCRF Console Incident Page Redirect

Name: BMCRF_Console_Incident_Page_Redirect

Description: Visualforce page for overriding the standard page actions ('new', 'view', 'edit') for Incidents so that they open in the Remedyforce Console rather than standard detail page. https://communities.bmc.com/ideas/4988

 

<apex:page standardController="BMCServiceDesk__Incident__c" showHeader="false" standardStylesheets="false" showChat="false" sidebar="false">

<script type="text/javascript">
  
    location.href = '{!$Page.BMCServiceDesk__RemedyforceConsole}?record_id={!$CurrentPage.parameters.id}&objectName=Incident__c';

</script>

</apex:page>


 

 

Problem Page Redirect

 

Label: BMCRF Console Problem Page Redirect

Name: BMCRF_Console_Problem_Page_Redirect

Description: Visualforce page for overriding the standard page actions ('new', 'view', 'edit') for Problems so that they open in the Remedyforce Console rather than standard detail page. https://communities.bmc.com/ideas/4988

 

<apex:page standardController="BMCServiceDesk__Problem__c" showHeader="false" standardStylesheets="false" showChat="false" sidebar="false">

<script type="text/javascript">

    location.href = '{!$Page.BMCServiceDesk__RemedyforceConsole}?record_id={!$CurrentPage.parameters.id}&objectName=Problem__c';

</script>

</apex:page>

 

 

Change Request Page Redirect

 

Label: BMCRF Console Change Page Redirect

Name: BMCRF_Console_Change_Page_Redirect

Description: Visualforce page for overriding the standard page actions ('new', 'view', 'edit') for Change Requests so that they open in the Remedyforce Console rather than standard detail page.

https://communities.bmc.com/ideas/4988

 

<apex:page standardController="BMCServiceDesk__Change_Request__c" showHeader="false" standardStylesheets="false" showChat="false" sidebar="false">

<script type="text/javascript">

    location.href = '{!$Page.BMCServiceDesk__RemedyforceConsole}?record_id={!$CurrentPage.parameters.id}&objectName=Change_Request__c';

</script>

</apex:page>

 

Step 2: Customize Object Actions

 

  1. Go to Setup | Create | Objects then click link for Incidents
  2. Scroll down to the "Buttons, Links, and Actions" section
  3. Click edit link for the Edit action then change the Override with and choose Visualforce Page option then select the visualforce page you created earlier
  4. Click Save button
  5. Repeat the action overrides in step 3 and 4 for both labels View and New
  6. Repeat steps 1-5 for the other objects (Problems, Change Requests, etc.)

 

Share This:

Some Background Info:

 

As of this writing, Salesforce provides no way of reporting on who belongs to which queues. To know who is a queue member, you must either (a) go to the Salesforce Setup page to manage the queue or (b) run a SOQL query and join on groupmember object then export the data using Data Loader or Enabler for Excel. But wouldn't it be great if there was an easier way? Something like the Staples® Easy Button™?

 

(A) Queue Setup Page

queuesetuppage.PNG

 

(B) SOQL Example


SELECT
     id, name, username, isActive
FROM
     user
WHERE
     id IN ( SELECT userOrGroupId FROM groupmember WHERE groupId = :groupId )
ORDER BY
     name

 

 

The Solution: Visualforce and Apex

 

staples_easy_button.jpg

 

Inspired by Chris Kress' post asking how to write a SOQL query to get a list of users assigned to queues, I put together some basic visualforce pages to demonstrate how to use the query and to conveniently export user records to Excel.

 

The source code and deployment options are available on my github repository: https://github.com/DouglasCAyers/sfdc-queue-members-excel. It contains a controller class for executing the SOQL to get queues and users, a test class with 100% code coverage for easy deployment into production orgs, a visualforce page for selecting a queue and viewing its members, and a visualforce page that renders the same queue members list in Excel.

 

The great thing is that this requires no special libraries or third-party code, it's all standard Salesforce functionality. Just too bad actually reporting on queue members isn't a standard report option.