-1

I have Created visualforce page and using pageblocktable shown contact list of record and every row we have a Edit link and want to redirect to their Standard edit page(contact).

 <apex:outputLink value="/?id={!con.id}" target="_blank"> 
                      Edit
 </apex:outputLink>

if I'm using above code it will redirect to Home page (Salesforce home tab).

 <apex:outputLink value="/e?id={!con.id}" target="_blank"> 
                      Edit
 </apex:outputLink>

it shows message url no longer available.

0

1 Answer 1

4

to edit record link should looks like:

value="/{!con.id}/e"

better solution is to use URLFOR and Action

value="{!URLFOR($Action.Contact.Edit, con.id, [])}"
1
  • 3
    Would be better to suggest using $Action global variable as it is more dynamic.
    – Raul
    Sep 12, 2017 at 9:39

Not the answer you're looking for? Browse other questions tagged .