I have an visualforce page with logic (VF page), which have a textfield (Text1). On load, the textfield is populated with a value from a parameter from the URL which is used for loading the VF Page. Below the Text1 field the VF Page is using the standard controller for Contact, with an extension. It shows the contact with all related fields/lists. Including relatedlist cases. Let's call the URL to this page:
salesforce/pages/tel?Id=12132&name=allen
As mentioned this VF Page uses standard controller to show complete contact details, and when the user clicks "New Case" button in relatedlist cases, I would like to transfer a variable from the VF Page, to a case field on the new case detail screen which opens.
So I want to transfer a variable from one context to another.
Is this possible? And how?
https://something.my.salesforce.com/500/e?cas14=Hello&cas15=World&cas3="{!$ApexPages.currentPage().getParameters().get('JobNo')}"
I want to use the parameters from the first URL im opening, to be used in the URL which is opened when i click custom "New Case" button. But how can I access the URL parameters to use in the forumla field for a custom button?
If I somehow could read the URL which I left, when i clicked the custom button, then I could substring the URL to only include the Parameter which i need, but I can't seem to find any method for retrieving this complete URL.