+ Start a Discussion
John DaJohn Da 

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:


(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.

Best Answer chosen by John Da
the Id will be there all the time ~so you can get it this way ~