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
dsh210@lehigh.edudsh210@lehigh.edu 

Custom Edit Page Links

Hey so I am wondering how I would accomplish the following:

 

I have a custom VF page with a list of custom objects on it. When a user clicks the title of a custom object, I want the user to be taken to the edit page for that custom object. I noticed that force.com titles the pages like https://na3.salesforce.com/a01A0000001aQoj. I am wondering where it is pulling that custom string from, so that I can create a string and append that to take the user to the correct edit page.

 

Thank you in advance for any help!

bob_buzzardbob_buzzard

That is the page to view the record in question.  Essentially its the server you are hosted on and the id of the record.  

 

It depends on how you are building the list as to what your options are - can you tell us a bit more?

dsh210@lehigh.edudsh210@lehigh.edu

The way I am printing the names is as follows:

 

<apex:column id="Name">
                        <apex:facet name="header">Name</apex:facet>
                        <apex:inputText value="{!this.AttrDef.Name}" rendered="{!editMode})"/>
                        <a href="#"><apex:outputText value="{!this.AttrDef.Name}" rendered="{!viewMode}"/></a>
</apex:column>

 

I would like to replace that '#' with the page to redirect to. I am just not sure how to get that ID for the current AttrDef that was clicked. Hopefully that makes things a little more clear.

 

The whole thing is in a <apex:pageBlockTable value="{!defs}" var="def" id="mainTable"> block.