[SalesForce] How to capture current users Name and Email

Work in a very large org and I have a VF button/page which shows a set of product fields that the teams are asked to edit/update

I would like to capture the user and email in a separate field so I can run workflow emails against the two fields.

I have seen where the current user ID and email is displayed but I havent seen how it can be populated and captured upon save.

Best Answer

I think you can use UserInfo.getUserId() in Apex code to get the ID, and probably a similar method to get the e-mail. You could call it when you call your VF page (assuming you have a custom apex controller).

Related Topic