Symptom
You are seeing the below error message after trying to publish an invoice.
String too long.
Applies To
Purchase/Sales invoices.
Cause
This error indicates that the Invoice Number or Reference you are entering is too long.
Resolution
To clear this error, you will need to edit the invoice number to ensure it is within the 20 character limit. After editing you should be able to republish the affected invoice(s) successfully.