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
philanthropyphilanthropy 

passing an ID to a second page

I'm learning Apex/VF and have created a very simple movie rental app. They select a unique button for each movie in a table. Some updates are made and then I want to pass the movie ID to a second success page displaying the movie that was selected. What is the best way to approach passing this ID to the second page?

 

Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
philanthropyphilanthropy

Nevermind, i was able to figure it out using:

 

ApexPages.currentPage().getParameters().set('id');

and

ApexPages.currentPage().getParameters().get'id');