Trying to delete a Poste Sales Invoice results in the following error:
Allow Document Deletion Before must have a value in Sales & Receivables Setup: Primary Key=. It cannot be zero or empty.
I am not too sure if the error stems from my code, and if it is I am not sure where to find the file that causes this.