Recently came across an issue where records from customized
tables were being deleted occasionally. Following wat did a quick fix for me to stop further records delete from table.
Overwrite delete method on table and comment super(). This also stops deletion from code, e.g. if we write query delete_from table this commented super will prevent user to delete record from table.
public void
delete()
{
//super();
}
This will also stop deletion from code too. e.g.
This will also stop deletion from code too. e.g.
It worked fine but
records can also be deleted by pressing Ctrl+F9 on table browser. To handle
this situation I overwrite validateDelete method on table and returned False
from there.
public boolean
validateDelete()
{
boolean ret;
ret = super();
return false;
}
Hi Faisal,
ReplyDeleteDoes this apply to table renaming to something different
Hi, What actually you want to achieve could you please share in details.
Delete