+ Start a Discussion
sri sfdcsri sfdc 

vf page id

How do I know current vfpage id in apex class?
Best Answer chosen by sri sfdc
sharathchandra thukkanisharathchandra thukkani
You need to use Apexpages.currentpage().getUrl() in the controller to get the name of the VF page and using the name query on the ApexPage object.

All Answers

sharathchandra thukkanisharathchandra thukkani
what do you mean by vf page id?

You mean the record id ? or the vf page id which starts with '066'?
sri sfdcsri sfdc
Hi Sharath ,

Its Visual force page ID only not record id.
sharathchandra thukkanisharathchandra thukkani
You need to use Apexpages.currentpage().getUrl() in the controller to get the name of the VF page and using the name query on the ApexPage object.
This was selected as the best answer