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
sidewindersidewinder 

linking to a record Edit page directly from the List view

I have defined a CustomObject and want to be able to directly link to the Edit page by clicking a record in the List view, bypassing the Detail page. My users always have to edit this type of record so it is a waste to make them go to the Detail page first.

I have tried a couple a things but had no luck finding a fully satisfactory solution.

For instance, I can create a Custom Field of type URL that I then populate with an Apex class that is called by a trigger:

public class CustomObjectModifier {
    public static void addUrlEdit(CustomObject__c[] cos){
        for (CustomObject__c co: cos){
            co.urlEdit = 'https://na5.salesforce.com/'+ oc.id +'/e';
            //(I got this URL using the Web Sevices API. It's not very robust to hardcode it here, but I don't know how to
            //access DescribeSObjectResult using Apex.)
        }
    }
}

I can put the urlEdit__c field in the List view, but the problem is that it opens in a new window. Also, it is ugly in the list view since it shows the entire URL, rather than some alternate text.

I have also tried creating a link to the Edit page as part of a Custom Link, for instance:

{!URLFOR( $Action.CustomObject__c.Edit , CustomObject__c.Id , null, true)}

However, there seems to be no way to put such a link on the List view.


Does anyone have any suggestions? Thanks in advance.