We do not want to solve this problems using security roles and privileges for reasons beyond this post. Basically, we have custom look up field on a form to a user, and we need an alert box to pop up anytime a user that isn't the one in the lookup field opens the record. A simple javascript alert box would be fine. However, it would be great if we could have a custom alert box that said, "You are not authorized to view this record." And then had a "Continue" button to close the alert box and view the record, or a "Close" button that closed both the alert box and record.
Basically we are checking if the current user == custom_lookUp field vale. Can we javaScript to do this? Any easy out of the box ways?






