Validation when user marks a record

Carlos_PtCarlos_Pt Member Posts: 21
Hi all, i am trying to run a validation when the user marks a record. I need to run it only one time, before the record becomes marked.

Example:
-Record Not marked
-User marks the record
bConfim := Confirm(... Do you really want to mark this record?)
IF not bconfirm then
MARK(FALSE);


Any help will be appreciated.
Best Regards :)

Comments

  • matttraxmatttrax Member Posts: 2,309
    There isn't a trigger to do this. You could check to see if it is marked after they move off of the field. Or tell them to check their work at the end before running whatever process they are going to run on the marked records.
  • kinekine Member Posts: 12,562
    Or you need to use some boolean field to "check" the record (it could be some variable saved in some temp table just for the form instance). Than you can use the confirm in OnVaidate of this field...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • matttraxmatttrax Member Posts: 2,309
    kine wrote:
    Or you need to use some boolean field to "check" the record (it could be some variable saved in some temp table just for the form instance). Than you can use the confirm in OnVaidate of this field...

    That's a great idea.

    You could also have a button with an override for the Ctrl + F1 shortcut key (if they use this and do not click Mark from the menu). That could throw a prompt and then mark (or not) the record.

    I think both ways have their pros and cons.
Sign In or Register to comment.