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
Sam WardSam Ward 

How do I display a value from the page I am on in a visualforce page

Hi, 

I am just wanting to be able to pass the current pages Name to my visualforce page, My visualforce page has a customer controller and is displaying a datatable, I can post both if there are any amendments to the code which might be needed. 

My end goal is to have a button on an account which someone can click and download any (Custom Object) Service Bookings meeting a critea matching the Account ID so that I can create a Proforma Invoice as a PDF. 

Thanks in advance. 
Best Answer chosen by Sam Ward
WEN JIEWEN JIE
Hi Sam,

So do you mean you click a button on account record, then you want to bring some inforamtion for this account record to your VF page?
You can write some js on this button, transfer the value you wanted by url directly but it's not safe enough.

All Answers

WEN JIEWEN JIE
Hi Sam,

So do you mean you click a button on account record, then you want to bring some inforamtion for this account record to your VF page?
You can write some js on this button, transfer the value you wanted by url directly but it's not safe enough.
This was selected as the best answer
Sam WardSam Ward
Hi Sorry for the delay, Yes I want to bring the account name from from the button I am clicking into a cell in my VF Page, Then I can create a PDF with this. It should be fine regaless of security as they are populated internally as PDF so it shouldn't be a problem.