Forum Replies Created

  • Hi Manjunatha,

    As delete button redirects to standard delete URL, so any validation error at backend comes out like an unhandled exception and can be seen as a "not so friendly" error message.

     

    Possible soluti0ns:

    1. Override delete button with a JavaScript button, using console api, query the record, check the delete condition as checked in validation rule and show the error message as a pop up from that JavaScript button. Pros: Easy, User-friendly. Cons: Not supported in lightning, no modifications in look and feel as standard browser specific alert message will be shown.
    2. Create URL button, a blank VF Page, or an Auro component, use that VF/Aura component's controller to validate the record before deleti0n show an error message as a pop-up message if any error comes, redirect to the same record on click of okay. Pros: Can customize the error message in a way you want, using CSS.  Cons: Development effort

    Thanks

     

    //Shakti

Popular Salesforce Blogs

Popular Salesforce Videos