We have a restricted user who has View, Create, Update, Delete permissions for Sales Invoices:
If they try to delete a sales invoice that has a receipt linked to it, they get this internal error message:
Fixed in the latest version (23.4.18). This was a more complicated fix because restricted users should not really see all referenced transactions if they have selective access to tabs.
So the latest version will show referenced transactions differently. In this case, attempting to delete customer which is already referenced by sales invoices and receipts will show break down by transaction type which you can drill-down into.
Obviously, if restricted user does not have access to Receipts tab, they won’t be able to drill-down further.