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

ID Field In VF Page Load
Hi all,
I created a button of object A, and this button opens to a VF page. I added this button to the related list of object B. When I clicked on this button from the page layout of object B, it loads up the VF page and this URL:
https://domain.salesforce.com/apex/VFPageName?retURL=%2FRECORD_ID&wrapMassAction=1&scontrolCaching=1&id=RECORD_ID
(where RECORD_ID is the actual record ID, a 15 digit ID)
So I'm writing some code to get the record ID from the URL, by doing ApexPages.currentPage().getParameters().get('Id')
My question is can I rely on this "ID" parameter, that it will always show up on the URL? Or should I rely on retURL? Thanks.


the Id will be there all the time ~so you can get it this way ~