0

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.. – Vamsi Krishna Jul 24 '15 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!! – Testing_SFDC Jul 24 '15 at 12:19
1

You can use action function.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionFunction.htm

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.

| improve this answer | |
  • 2
    The problem here is to make use of Javascript in List Buttons but the provided suggestion will work only inside of Visualforce page. – Vigneshwaran G Jul 24 '15 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.