Xero sync error: Invalid entity data. poNumber: Maximum length cannot be greater than 40 characters

Why the sync error occurs

This error occurs when a bill is attempting to sync from Xero, but the Reference field of the bill exceeds the 40 character limit.

How to fix the sync error

To resolve this error, edit the bill in Xero and update the character length of the Reference field to less than 40 characters. Once the bill is updated, sync again.