I have an object TB SID with a field ZOI (checkbox). I need to implement the below logic only on CREATION of new records:

  1. When ZOI is checked, than the record should be saved directly (this can be implemented by workflow rule)

  2. When ZOI is unchecked, I need a popup window appearing with the below message: “ZOI is unchecked. Select OK to confirm and save the record or CANCEL to return to edit mode”.

So, 2 buttons are required in the Popup window .i.e.: OK – Saves the record CANCEL - Record remains in Edit mode (record is not saved).

Can someone assist me to implement the second logic when ZOI is not checked?

  • Would be not possible in standard page unless you it override with a Visualforce page.
    – Raul
    Nov 23, 2016 at 8:39
  • How should i proceed with it? I am new to development.. so, Rahul can you please brief in detail?
    – user39454
    Nov 23, 2016 at 8:46
  • You can do this in Salesforce classic with connection.js and jQuery. Please follow the link valnavjo.com/blog/modal-dialog-on-a-standard-salesforce-page
    – Saroj Bera
    Nov 23, 2016 at 10:15

1 Answer 1


I think you should go with Validation Rule since record can't be saved if flag is not checked. It may not be as pretty as popup but is faster to develop :)

  • Good one, Link to trailhead - Creating Validation Rules
    – Raul
    Nov 23, 2016 at 9:17
  • Thank you for the suggestion of creating a validation rule. But with validation rule, I will stop on the edit page only. However, if you check my requirement, if the user clicks on the OK button from the popup window, than he should be able to save the record. And, if he click on the CANCEL button, than only he should stay on Edit page. Please assist.
    – user39454
    Nov 23, 2016 at 9:30

You must log in to answer this question.

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