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
balraj singh 33balraj singh 33 

how can i implement below Sort functionality in my custom object

User-added image
Khan AnasKhan Anas (Salesforce Developers) 
Hi Balraj,

Greetings to you!

Please refer to the below links which might help you further with the above requirement.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
SandhyaSandhya (Salesforce Developers) 


Below is the sample code.

<apex:page controller="sortController">
    <apex:selectList multiselect="false" size="10">
      <apex:selectOptions value="{!lineItems}" />
    <apex:commandButton action="{!moveTop}" value="Top" />
    <apex:commandButton action="{!moveUp}" value="Up" />
    <apex:commandButton action="{!moveDown}" value="Down" />
    <apex:commandButton action="{!moveBottom}" value="Bottom" />
    <apex:commandButton value="Save" action="{!save}" />
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards