How to fetch logged in user details

I wanted to fetch logged in user details on click of button for first time and want to display an alert on click of same button from next time onwards.

Can anyone please suggest how can i get logged in user details on button click.

You can create a model on the object “user” and add a condition to limit the records returned to just users whose Id equals the currently logged in user. Then you can choose any fields from the user object that you want to bring into that model. Then you can access that information in account sequences attached to buttons to do whatever you want with it.