0

I created a custom button in Account. When user clicks on this custom button and it will access to a VF page. In the VF page, I would like to display and capture who clicks the custom button. So my initial approach is to create a custom lookup field that lookup to User object. But I'm having problem of how to find out who clicks the custom button and capture it into this lookup field then populate it in the VF page.

1 Answer 1

1

Use UserInfo Class, it will help you get any information you need.

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_userinfo.htm

1
  • I got it working by using UserInfo.getUserId() method to assign it to the lookup field.
    – R.Spark
    Commented Jun 9, 2014 at 22:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .