Sweetalert question

Is it possible to get toast or sweetalert work after insert, update or delete the record on some form if it is checked to exit the application after processing the form?