So I am required to give an error message to prevent users from deleting all the posted documents i.e. posted sales invoices. I am unable to find the delete button page action trigger where I can write the code to error and possible stop the execution of deletion.
you can either
1) put the error message on OnDelete trigger in the table Sales Invoice Header
2) remove delete permission to table Sales Invoice Header
3) set DeleteAllowed to No on page Posted Sales Invoice.
Business Applications communities