1

I have a requirement wherein I have to display a warning message to the user on record save. It doesn't prevent records save, but just show's an error message.

I have been trying to think of the best solution but nothing makes sense. it doesn't make sense to display a component content based on record value's and that's something I was thinking of implementing.

What would be the best possible solution to show a 1 time warning message based on certain values whenever the user save's the record on record page.

Thanks

  • When you say warning, is it something the user has to acknowledge before the save can continue? Or is it just merely a toast that just shows when the save is occurring? – Bryan Anderson Nov 18 at 15:05
  • @BryanAnderson It's merely a toast which presents a message to the user and it does not prevent the record from getting saved.. The record would still be saved.. It's just that this message would be displayed only for a few conditions and not always. – Ashutosh Arora Nov 18 at 15:11
  • Not my solution, but this post (blog.texei.com/…) has a way to have a lightning component hook into the Change Data Capture API, and then you can fire a toast based on the result from that API call – Bryan Anderson Nov 18 at 15:14
  • One way is to override the layout with custom record forms and show the message using submit handler events – RedDevil Nov 18 at 20:35
1

Short of writing code, you can't implement this right now. There's an Idea you should go vote on.

  • this idea is 12 years old :( – RedDevil Nov 18 at 20:36
  • @sfdcfox yes.. the idea seems to be pretty old.. Looking for a workaround to handle this scenario.. – Ashutosh Arora Nov 19 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.