function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Andee Weir 20Andee Weir 20 

How to add a Warning message on standard Lightning UI

Hi,

I have a user requirement to add a warning message to the standard Lightning Case UI which displays an 'Are you sure?' type message if the user is updating the status to Closed & a custom field, frequency__c, is not One-Off.  It should work in a similar fashion to the warning that appears in Lightning when deleting a client e.g. user given 2 options; one that continues with the operation & the second cancels it.

Any thoughts on how to achieve this? Thanks
Best Answer chosen by Andee Weir 20
Andee Weir 20Andee Weir 20
Unfortunately it is not possible to alter the Save button behaviour.

All Answers

AbhishekAbhishek (Salesforce Developers) 
Alerts are part of system messaging and are handled internally by Salesforce. Partners building apps that appear within Salesforce shouldn’t use alerts.

You can Implement based on this article,

https://www.lightningdesignsystem.com/guidelines/messaging/components/alerts/

For further reference, you can try this too,

https://developer.salesforce.com/docs/component-library/bundle/ui:message/example

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.
Andee Weir 20Andee Weir 20
Unfortunately it is not possible to alter the Save button behaviour.
This was selected as the best answer