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
lokesh reddy 7lokesh reddy 7 

compare users in on button click

Hi,

I am Creating custom button in salesforce when i click on the button it will execute java script here i need to check the current logged user .and need to add users to one list and compare the user with users in the list if the logged in user is present in the list then redirect to page1 .else give an error message.
Can someone tell me how to write javascript code to achieve this?

thanks
lokesh 
Ankit Gupta@ DeveloperAnkit Gupta@ Developer
Hi Lokesh,

You can create vf page. In which display the user by query on user object. Give the checkbox on vf page to select the users.
Add 1 button in that page and on that button action do whatever you want.