+ Start a Discussion

Override a "new" button to check a value on the page first

We have a custom page called "Project".  In the page for Project, we have different related lists (Assignments and Billing Events).


What we need to do is, when the user clicks the "New Assignment" button in one of the related lists, we check a value on the Project page to see if they should be clicking that button or not.  If they are not supposed to, display a message stating this, or if they can click the button, allow them to go to the new screen.


Another idea we had was to disable the "New Assignment" button in the related list on page load.  Any ideas how to do either?




--Todd Kruse



Message Edited by ToddKruse on 02-15-2010 10:16 AM
Add a custom list button on Assignment called 'New Assignment'.  Use that button in your related list on Project page rather than the standard 'New' button for Assignment related list.  Your controller extension can have the code to check the value (assuming it is persistent [stored in the db]) and conditionally pop an error message