I'd like to build a field similar to the standard Owner field, which includes a [Change] link immediately to the right of the field value.
However, the additional requirement I have is that the link open in a new window.
Things I've tried:
1.<apex:outputlink>
Allows opening in new window, but it acts as a separate pageblock item, so I can't put it immediately to the right of a field value
2.<apex:outputText label="fieldLabel" value="{!Object.fieldValue} [{!LINKTO(...)}]"/>
This method will display the LINKTO value as part of the field value, which is good. However, LINKTO does not allow me to specify opening a new window.
3.<apex:outputText label="fieldLabel" value="{!Object.fieldValue} [{!HYPERLINK(...)}]"/>
HYPERLINK function does allow me to specific opening a new window, but when trying to use in a visualforce value returns the error problem: Function HYPERLINK may not be used in this type of formula
Now I'm trying to mess with straight HTML (ie the <a>
tag), but I'm not sure how to get it to display immediately to the right of the field value.
Your help as always is much appreciated!