I have a requirement where if a Case is saved without a value in a field, the page needs to prompt the user if they are sure they want to save. This would need to be on a standard page layout.

I was thinking of using a trigger, but there is no actual way to get the user to interact with the trigger.

Javascript prompting can't be used because it's not a visual force page.

Validation rules can't be used, because it prevents the saving of the record.

Any advice would be great.

  • 1
    If you want to accomplish this, you need to replace the relevant Case actions (New/Edit) with VF. I'm pretty sure there is no way around that.
    – Adrian Larson
    Commented Jun 10, 2015 at 19:51

3 Answers 3


You can add a checkbox ('No Value in Field' in your case) and apply a validation rule that validates the box is checked and if not, throws an error asking them to confirm by checking the box. The downside to this is that some users just tick the box every time they save as they realize this will avoid the error. I usually add a workflow to clear the checkbox upon completed save, so that the user will have to reconfirm


Another approach is probably you need to go to a custom UI

There is an idea about warning messages on record save.Please vote for it

  • Hi Sf.dev, I know I might be putting a silly question here but just curios. Can't we insert the Visualforce component and use just jquery to get the SAVE button, write code for confirmation and complete this requirement. I believe, based on below we can still run javascript on standard page layout .salesforce.stackexchange.com/questions/38918/… Apologies if I asked a stupid question.. Commented Jun 10, 2015 at 20:18
  • Thanks @sf.dev , I'm letting my team know about this. Also that link is 7 years old. I highly doubt salesforce monitors that Commented Jun 10, 2015 at 20:33
  • On the contrary - Shannon Hale, the relevant PM, posted an update a couple of years ago. We do monitor ideas, particularly as they continue to pick up votes.
    – metadaddy
    Commented Jun 10, 2015 at 23:07
  • @amidstCloud I wouldn't give up on old Ideas in the Success Community, as a former Product Manager, we pay attention to the ones getting votes. Commented Jun 19, 2015 at 14:09

You want a Validation Rule, however, there is no mechanism to override in the Standard Platform. The UX describe by SF.DEV would prevent saving and would require an additional field to be persisted.

Alternatively, you could create a "Wizard" using the Visual Workflow "Interview". Visual Workflow Documentation

You would collect the basic information in one or more screens. On those screens, you can use validation for fields that are always required. For fields that are "recommended" but may be overridden, you need a Decision step and then you can show a Confirmation screen before you save the record. If the user doesn't confirm the save (without value), you can send them back to the prior screen to update.


An alternative approach to this is the soft alerts solution

Essentially, rather than prompting the user: 'are they sure they want to save', you let the save go through but display via an Alerts__c formula text field using IMAGE() - a nice yellow flag and the message (at the top of the page layout) -

"Case saved without a 'foo'. Edit the case if 'foo' should be present."

This of course may not be relevant for all use cases but it avoids the VF or VF+jQuery path - 100% clicks, not code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .