You need to sign in to do that
Don't have an account?
JCSJCS
Javascript - IF User has "permissions"?
I have a List View Button that runs javascript to change the contents of a field. Basically, it is a bulk approval process - our salesmanager can run a list, check off a bunch of deals, then click the button to "Approve" a process (which is indicated by a specific field being updated to "APPROVED.")
I only want him to be able to run this button and have added a USER CUSTOM FIELD called APPROVE_DATA. How can I incorporate an IF statement in the javascript to first check if the logged in USER has APPROVE_DATA = TRUE before running the button. If APPROVE_DATA = FALSE, I would kick out an error.
Thanks - jcsjcs
{!$User.APPROVE_DATA__c}
So something like the following may work for you:
Code: Hope this helps