Cancel and Save buttons
I have a project where I would like to have two buttons, named <Cancel> and <Save>.
If the record was just created and the user click <Cancel>, the script would erase that record. If he presses <Save>, it would save the record. I think the best way to do that would be to have a field named <New record?> for example with an auto value of True and have the script check that field. If the user click on <Cancel> and that the field is True, it would erase the record. If he presses on <Save>, the script would change the field value to False, confirming it is not a new record anymore.
But, in the case where the record already exist (with the <New record?> field set to False, if the user click on <Cancel> I would like the record to revert back to the original info.
Do you have any suggestions or ideas?