You need to sign in to do that
Don't have an account?
[URGENT]: Pass variable over standard pages
i have to pass one variable on click of a custom button on standard page. The button will lead to new oppty page. here, on the opportunity i want to save the variable's value to one of the oppty field.
i tried using to send over url but i was unable to fetch that value on oppty.
please let me know what are the other options to pass variables on standard page.
Thanks
Pagereference won't work for standard pages.
Making the button target a URL and passing the parameters on the URL is the correct way to do this (although its unsupported, so there is no guarantee this will work with future releases).
Check out this blog post (not mine) which has a detailed discussion of how this works:
http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html
All Answers
Aakash,
You can use Pagereference class.Please find below the link for the same :-
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_pages_pagereference.htm
Pagereference won't work for standard pages.
Making the button target a URL and passing the parameters on the URL is the correct way to do this (although its unsupported, so there is no guarantee this will work with future releases).
Check out this blog post (not mine) which has a detailed discussion of how this works:
http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html
Super!
Thanks for the response.... exactly what i was looking for!
i have added a custom setting to avoid hard coding and to be able to deploy to production.
The field to which we are storing the value from URL should be present on the page layout.
Can we make it hidden, i mean i dont want it on the page layout, it is just used for getting the value, can that field be removed from the layout???
Thanks.