I have a requirement to show a javascript pop-up that 'U r not allowed' when a particular profile Users click on the List button. For the rest of the profiles , I have a landing VF Page to deal with.

Can someone let me know if that can be done?

Making the List button I have behavior Onclick javascript will negate my page, that I see right now.

  • can u share your current javascript code of the list button, then someone can suggest what can be included to make the profile check.. Commented Jul 24, 2015 at 10:31
  • 1
    I am working on as susanoo suggested. I will let you guys know if I face any issue here. Thanks Guyz!! Commented Jul 24, 2015 at 12:19

1 Answer 1


You can use action function.


Action functions can be called from javascript and can return values which you can process in javascript so you can alert user via javascipt popup of the function returns success or not.

  • 2
    The problem here is to make use of Javascript in List Buttons but the provided suggestion will work only inside of Visualforce page. Commented Jul 24, 2015 at 10:29

You must log in to answer this question.

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