--- title: "D365 document number too long for Administrators - Payhawk Help Center" slug: "document-number-is-too-long" description: "Fix the Document number is too long error in Microsoft Dynamics 365 Finance: enable the feature that extends the invoice number length, then export again." updated: 2026-03-16T14:00:57Z published: 2026-03-16T14:00:57Z canonical: "payhawk.com/document-number-is-too-long" --- > ## Documentation Index > Fetch the complete documentation index at: https://payhawk.com/help/llms.txt > Use this file to discover all available pages before exploring further. # Failed to export into Microsoft Dynamics 365 Finance. Document number is too long. ## Error message ```plaintext Failed to export into Microsoft Dynamics 365 Finance. Document number is too long. ``` ## Affected ERP integrations - Microsoft Dynamics 365 Finance & Operations ## Cause This error occurs when the document number exceeds the default maximum length of 20 characters allowed for export to Microsoft Dynamics 365 Finance & Operations. ## Solution To resolve this issue: 1. Log in to your Microsoft Dynamics 365 Finance & Operations account. 2. Navigate to **Features management**. 3. Select the **Extend the length of invoice number for vendor invoice** feature and enable it. Once the feature is enabled, return to the Payhawk Web Portal and try to export the expense again. ![Feature management interface displaying invoice number extension details for vendor invoices.](https://storage.googleapis.com/payhawk-cdn/Adm%3AIntegrations%3AError%20messages/msfo_Document%20number%20is%20too%20long.png)