returning FALSE in From's OnDeleteTrigger

EugeneEugene Member Posts: 309
in Form - OnDeleteRecord() : Boolean
under certain conditions i issue
EXIT(FALSE);

the problem is that when a user presses F4 the conformation dialog still pops up with the message "do you want to delete the record ?"

is there a way to avoid the message popping up ?

Comments

  • garakgarak Member Posts: 3,263
    if it is not allowed for the user to delete a record in this form, set the Form Property "DeleteAllowed" to NO
    Do you make it right, it works too!
  • EugeneEugene Member Posts: 309
    that's right but it depends on a certain condition at run time so i cannot simply set DeleteAllowed to FALSE because i cannot change the property at run time
  • kinekine Member Posts: 12,562
    Try to add own Menu Item with F4 shortcut where you will call Rec.DELETE(True) if you want to delete something - in this case the Form OnDelete and other functions will not be called and the message will not be there...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.