Client Script to send an email to the user when the user try to delete the timesheet.
how to send an email I know.
but what I don’t get is in client script which event trigger I should be using when a user deletes the timesheet?
“Client script executes only on create, copy and edit. To execute a script in any other mode, you must use a user event script.”
The Smiling Coders : CAN CLIENT SCRIPT EXECUTE IN VIEW OR DELETE MODE?
So you’d have to use a UE script’s beforeSubmit entry point and check that the trigger type is ‘DELETE’. (if you wanted to prevent the delete action in beforeSubmit, you’d have to throw an error)