Hello, I added a before validate class to perform certain actions when ARs are new or updated (such as auditing logs,etc.).
I’m trying to control the type of record it is to perform the necessary actions needed for the various records. Any ideas how to do this?
Thanks for your help. Something like:
<?php
if($this->isNewRecord AND $this-> type =='User'){
// set the create date, last updated date and the user doing the creating
}
else if ($this->isNewRecord AND $this-> type =='Customer') {
// set the create date, last updated date and the user doing the creating
}
?>