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
gvgv 

Question abt link

Hi

I am going to have a link in my visualforce page 'A'. It willbe called from multiple places(for ex. from 4 other pages) .

 

So if I have a link called back in 'A' how would I code so that it takes me to the correct place from where it was called.

 

Thanks

bob_buzzardbob_buzzard

We've added information to the link URL to indicate where it came from. 

 

 

hisrinuhisrinu

For this you can make use of apex:param tag, which will give you the ability to pass some value to controller on click of commandlink.

 

<apex:commandLink value="http://google.com/search" action="{!method}">

<apex:param name="q" value="{!contact.name}"/>

</apex:commandLink>
Jeremy_nJeremy_n

Right, you can add a parameter to the URL. The convention is to make sure 'retURL' specifies the page you were just on. So for my custom Opportunity Product VF page, the URL to get there looks like "/apex/ProductPicker?id=xxxxxxxxxxxx&retURL=xxxxxxxxxxxxx". On my product picker page, the Cancel button takes them back to the Opportunity page, by looking for that parameter.

 

Let me know if this doesn't answer it.

 

Jeremy