Close Modal after delete

hi,
how can I close a form open in Modal after having done the deletion of the record?
I can do this after insertion but not after deletions.

thanks

Try with Javascript:
parent.window.tb_remove();

where i have to add? in a form have only onload and onsubmit in javascrip event.

Create an event Javascript from
FORM SETTINS-> JAVASCRIPT ->FORM ->EVENT ONSUBMIT
and paste the code:
parent.window.tb_remove();
alert(“Ready”);

hi,

i tried, but the form stops working.

In the onAfterDelete event:

sc_commit_trans();
sc_exit();

I try, Work fine.
Thanks