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

Accept Button on List view page on Case Object -- Need Help

I need to remove Edit | Delete Link from the Case Object's list view page (One that you get after selecting a view from dropdown on Case Tab page ). I tried to use <apex:listview>  or  <apex:enhancedlist> to create new list view but I don't get options to remove the ACtion Colums that has liks for Edit | Delete  for each records on the list. So, I decided to design the whole page using Pageblock table and iterating the case records using recordSetVar =" "  attribute. My problem is I Can't understand how to proceed to implement the logic for Accept button. --- It changes the Case Owner from currnt queue to the current user..when user clicks it after selecting few cases. I think I am doing something wrong with the code. It is just refreshing the case. Not doing anything.


Can anyone please help me on this?..If this not the right way, then can someone suggest how to proceed...??


<apex:page standardController="Case" recordSetVar="cases" extensions="CustomCaseListController" tabStyle="Case_List_View_Tab__tab" > 

    <apex:outputPanel id="keywordheaderPanel" layout="block" style="border: solid 0px red; width: 100%; margin: 0px; text-align: left; height:40px;">
            <apex:sectionHeader subtitle="Cases"  />
    <apex:pageBlock > 
        <apex:form id="theForm">
            <apex:panelGrid columns="4" >
                <apex:outputLabel value="View:"/>
                <apex:selectList value="{!filterId}" size="1">
                    <apex:actionSupport event="onchange" rerender="list"/>
                    <apex:selectOptions value="{!listviewoptions}"/>
                <apex:commandButton value="Accept" title="Accept" action="{!acceptCase}" />  <!-- This is the button in question --> 
                <apex:commandButton value="New Case" action="/setup/ui/recordtypeselect.jsp?ent=Case&retURL=%2F500%2Fo&save_new_url=%2F500%2Fe%3FretURL%3D%252F500%252Fo" />
            <apex:pageBlockSection title="Cases" id="list2" columns="1" collapsible="false">
                <apex:pageBlockTable value="{!cases}" var="c" id="list" rules="col">
                    <apex:column headerValue="Action"> 
                    <apex:selectCheckboxes id="chkboxid">
                    <apex:column id="caseId" headerValue="Case Number" >
                        <apex:commandLink action="/{!c.Id}" value="{!c.CaseNumber}" /> 
                        <apex:param assignTo="{!caseId}" value="{!c.Id}" />
                    <apex:column headerValue="Case Subject" > 
                        <apex:commandLink value="{!c.Subject}" /> 

                    <apex:column value="{!c.CreatedById}" />
                    <apex:column value="{!c.Priority}" />
                    <apex:column value="{!c.Status}" />
                    <apex:column value="{!c.Contact.Name}" />
                    <apex:column value="{!c.Account.Name}" />
                    <apex:column value="{!c.CreatedDate}" />


public with sharing class CustomCaseListController {
    public ApexPages.standardcontroller Controller {get;set;}
    Public String caseId {get; set;}
    public ApexPages.standardSetController setcOntroller{get;set;}
    //List<Case> caseId = new List<Case>();
    public Case c { get; set; }
    public CustomCaseListController(ApexPages.StandardSetController controller) {
        this.setcOntroller = controller;
    public CustomCaseListController(ApexPages.StandardController stdController) {        
        // constructor        
        Controller = stdController;        
        this.c = (Case)stdController.getRecord();    
     public PageReference acceptCase() { 
         //Can't understand what to write there???  
         system.debug('selected values: ' +setcOntroller.getSelected());
         return null;



I don't know if you are still looking for a solution to this, but I found this blog post which offers a solution to your issue.