Jam.py documentation

delete

delete()

domain: client

language: javascript

class Item class

Description

Deletes the active record and positions the cursor on the next record.

The delete method

  • checks if item dataset is active, otherwise raises exception

  • checks if item dataset is not empty, otherwise raises exception

  • if item is a detail , checks if the master item is in edit or insert state, otherwise raises exception.

  • if item is not a detail , checks if it is in browse state, otherwise raises exception.

  • triggers the on_before_delete event handler if one is defined for the item.

  • puts the item into delete state

  • deletes the active record and positions the cursor on the next record

  • puts the item into browse state

  • triggers the on_after_delete event handler if one is defined for the item

  • updates data-aware controls