Can I trap the delete event and change it to an update

Can I trap the delete event and change it to an update

pzh20pzh20 Posts: 66Questions: 15Answers: 0

I want to be able to trap a delete operation and turn it into an update where I flag a field to say it's no longer in use. This is for historical data where they are not current but cannot be deleted.

Regards
Pete

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,771Questions: 1Answers: 10,112 Site admin
    Answer ✓

    What you would do is not use a delete action, but rather an edit that is just visually labeled "Delete" for the end user.

    Have a look at the edit() documentation, and the examples towards the end of the page which show you you can trigger it programmatically (if you want to do that).

    Allan

  • pzh20pzh20 Posts: 66Questions: 15Answers: 0

    I should have thought of that.

    Many thanks
    Pete

This discussion has been closed.