You need to sign in to do that
Don't have an account?

how to set the returl to a field listed on the visualforce page
I have a visualforce page that i'd like to have the "returl" to be directed to a field listed on the record (acc.Opportunity__c)
is that possible?
<apex:page Controller="RetUrlSearchController">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection title="Criteria">
<apex:outputLabel value="Enter Name Snippet"/>
<apex:inputText value="{!nameQuery}"/>
<apex:commandButton action="{!executeSearch}" value="Search"/>
</apex:pageBlockSection>
<apex:pageBlockTable value="{!accounts}" var="acc">
<apex:column headerValue="Name">
<apex:outputLink value="/{!acc.id}/e?retURL={!URLENCODE('/apex/InvoiceHeaderSearch?query='+nameQuery)}">{!acc.Name}</apex:outputLink>
</apex:column>
<apex:column value="{!acc.Invoice_Date__c}"/>
<apex:column value="{!acc.Territory__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
is that possible?
<apex:page Controller="RetUrlSearchController">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection title="Criteria">
<apex:outputLabel value="Enter Name Snippet"/>
<apex:inputText value="{!nameQuery}"/>
<apex:commandButton action="{!executeSearch}" value="Search"/>
</apex:pageBlockSection>
<apex:pageBlockTable value="{!accounts}" var="acc">
<apex:column headerValue="Name">
<apex:outputLink value="/{!acc.id}/e?retURL={!URLENCODE('/apex/InvoiceHeaderSearch?query='+nameQuery)}">{!acc.Name}</apex:outputLink>
</apex:column>
<apex:column value="{!acc.Invoice_Date__c}"/>
<apex:column value="{!acc.Territory__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Its not very clear, are you trying to set anchor element ?
Its not very clear, are you trying to set anchor element ?
Your apex action may look like the following:
And you would replace your apex:outputLink tag with the following: