User should not delete the transaction.

In my DocumentHandeling form once we attached any document that should not be delete directly , First i have to remove that document attachment then after that only i need to delete the below transaction line.

Actually I tried with delete action but it’s not working please help me for that functionality.

Below is the screen shot.


This functionality can easily be achieved by using the Delete Actions on your table. Create a Delete Action in your main table of type “Restricted” for the related table DocuRef. The Restricted delete action restricts deletion in the current table if data is present in related tables.

It may be possible that you might have created a Cascade delete action due to which you are not able to achieve this functionality. Please check.

After following the suggestion if still there are any issues then revert back specifying for which table you are not able to achieve this functionality.

Does it is the standard document handling functionality?

You can even override the validateDelete() on the table.

Have a look here \Data Dictionary\Tables\DocuType\Methods\validateDelete

HI Kranthi

Thanks for the reply, no it is not the standard document handeling this is our own requirement. As per your suggestion i have completed the task .

HI Dutt

Thanks for the reply,I have already tried in that way but it is not working. so i Override the ValidateDelete methos in the table level, now it is working properly.

Hi Below is my Solution.


public boolean validateDelete()


boolean ret;

if ((select docuRef

where docuRef.RefCompanyId == this.DataAreaId &&

docuRef.RefTableId == this.TableId &&

docuRef.RefRecId == this.RecId).RecId)


ret = false;

throw error(strfmt(“Cannot delete the record ,document attached to it”));




ret = super();


return ret;