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
afaik the only way is calling die() or exit(). looking at the code (crmentity save) it seems there is no way to communicate back this information.
this is a good proposal for a trac enhancement ticket. do you want to open or do i do it?
joe
tsolucio
please open the ticket. although i have a track user i could not yet get myself into it...
kind regards
andreas
<!-- m --><a class="postlink" href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/6269">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/6269</a><!-- m -->
joe
tsolucio