CRM follows a nice procedure of soft deletion of records for all the tables to maintain the consistency of the data. It also has a confirm delete functionality wherein when any user deletes any entity record he is redirected to new screen with Confirm Delete button. When we design custom entity through wizard, we get the delete button, but no confirmation is asked after clicking it. What if user clicks it by mistake and accidentally deletes the record? Below is the procedure that you can follow to implement simple Confirm Delete functionality on your custom pages.
1. Put the Delete button on your asp page as per standard way.
2. Call client side JavaScript function on your delete button as shown below.
Container.AddButton(eWare.Button (“Delete”,”delete.gif”, javascript: fn_Delete ();”));
3. Inside the JavaScript function put the confirmation box to take confirmation from user before deletion. Refer below script.