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
AkiraDioAkiraDio 

Getting ID

Good day!
As in the apex controller to get a user ID and page ID VF, in String variable?

Jia HuJia Hu

Use UserInfo.getUserId() to get the current User Id. What do you mean page Id?

 

BTW, you can use PageReference Class to get the info of a VF page, see

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_pages_pagereference.htm

 

AkiraDioAkiraDio

Jia Hu wrote:

Use UserInfo.getUserId() to get the current User Id. What do you mean page Id?

 

Thank you!


 

BTW, you can use PageReference Class to get the info of a VF page, see

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_pages_pagereference.htm

 


I read, but I do not quite understand how to get the ID of the page in the String.



AkiraDioAkiraDio

I need it to make a line of this form - ActPage = new PageReference ('/' + Prefix + '/' + 'e? What_id =' + adID + '& retURL =' + '/ apex / MyCoachBusinessPlan');