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
StaciStaci 

current users account name in JavaScript button

Is there a way to get the current logged in user's account name in a custom JavaScript button?
Prema -Prema -
You can create Label and then you can assign to the button as Label.Users_Account_Name..
Malni Chandrasekaran 2Malni Chandrasekaran 2
Staci,
If I have understood your question right, 
- Get the current logged in user id using ' UserInfo.GetUserId' method.
- Then get the contact ID from 'User' object using user id.
-Finally get the account name (Account.Name) from Contact table using the contact id you got from user table.

Please mark it best answer if it answers your question