redirecting after server event

Hello,I customized Row_Deleting event in order to update a field on the record instead to really delete the record.Something like this

function Row_Deleting(&$rs) {

	   $id = $rs['id_tipo'];
		$Oggi = date("Y-m-d");
		$sql = "UPDATE ".$this->UpdateTable." SET dt ='$Oggi' WHERE id_tipo = ".$id;
		$result = Execute($sql);
		if($result)
		{
			Conn()->CommitTrans();
			$this->setSuccessMessage("Cancellazione eseguita!");
            $ReturnUrl = $this->getReturnUrl();
            header( "Location: $ReturnUrl" );
   
		}
		else
		{
			Conn()->RollbackTrans();
			$this->setFailureMessage("ATTENZIONE: Impossibile cancellare l'oggetto richiesto!");  
		}    
		return FALSE;
}

Now I need to redirect user to list page with success/fail message popup.
If I just header( “Location: $ReturnUrl” ); the message is not showed. Just guessing if there is another way

Found answer: $this->terminate($returnUrl);