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

Mass Edit Cases set to sort ASC

Hi, this is VF code form the Mass Edit Cases from App Exchange. Can anyone help me with code to set it to where it sorts by Development Priority ASC? It doesn't have to toggle, just always load that way. Thanks!

<apex:page standardController="Case" recordSetVar="unused" sidebar="false">
<apex:includeScript value="{!$Resource.UtilJS}" />
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlock >
Note: All modifications made on the page will be lost if Return button is clicked without clicking the Save button first.
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Return" action="{!cancel}"/>
<apex:pageBlockTable value="{!selected}" var="a" id="table">
<apex:column headerValue="Case Number">
<apex:inputField value="{!a.CaseNumber}"/>
<apex:column headerValue="Subject">
<apex:inputField value="{!a.Subject}"/>
<apex:column headerValue="Status">
<apex:inputField value="{!a.Status}"/>
<apex:column headerValue="Development  Priority">
<apex:inputField value="{!a.Development_Priority__c}"/>
<apex:column headerValue="Business Priority">
<apex:inputField value="{!a.Customer_AM_Requested_Priority__c}"/>
<apex:column headerValue="Case Rank">
<apex:inputField value="{!a.Case_Rank__c}"/>
<apex:column headerValue="Type">
<apex:inputField value="{!a.Type}"/>
<apex:column headerValue="Description">
<apex:inputField value="{!a.Description}"/>
Samruddhi GokhaleSamruddhi Gokhale
You will have to use a custom controller/extension.
Thank you, Samruddhi. I realized it might could be done with code, but I need help with that too since I'm not a developer. Any help with code would be greatly appreciated! Thanks!