Applies To: Work 365 (Dynamics 365 / Power Platform)
Audience: Billing Teams, Administrators, Finance Users
Overview
The error “Input string was not in a correct format” during invoice generation almost always means the Payment Terms on a Billing Contract do not have an exact match in Work 365 → Admin Hub → Configuration → Payment Terms.
Example: The contract uses “Net 15”, but “Net 15” is missing (or spelled differently, e.g., “Net15”) in the Payment Terms mapping.
Why It Happens
When generating invoices, Work 365 reads the contract’s Payment Terms and resolves it against the mapping list in Admin Hub → Configuration → Payment Terms.
If there’s no exact match (spacing/case/characters), the lookup fails and the engine throws the format error.
Resolution Steps
Open Payment Terms configuration
Work 365 → Admin Hub → Configuration → Payment Terms.Review existing mappings
Find an exact match for the value on the Billing Contract (pay attention to spaces/case:Net 30≠NET30≠net 30).Add the missing term (if needed)
Click Add New Term.
Payment Term: enter the exact term from the contract (e.g., Net 15).
Mapped Term Code / CRM Field Value: select or enter the corresponding Dynamics 365 Invoice term (the paymenttermscode option).
Click Save.
Retry invoice generation
Return to the Billing Contract → click Generate Invoice again.
Quick Validation Checklist
The Billing Contract → Payment Terms field is not blank.
The exact term exists in Admin Hub → Payment Terms.
The mapped term corresponds to a valid Dynamics 365 paymenttermscode option.
No custom workflow/Power Automate step is overwriting the Payment Terms at runtime.
Additional Notes & Best Practices
Exact-match required: Treat terms as literals (including spaces and punctuation).
Standardize naming: Decide on a canonical style (e.g., “Net 30”) and use it everywhere (products, contracts, templates).
Map before go-live: Ensure all terms used by contracts are present in the mapping table.
Audit regularly: Create a saved view for Billing Contracts using non-standard or unmapped Payment Terms.
Custom terms: If you use terms like Net 15 or Net 90, verify the corresponding option exists in Dynamics (or let Work 365 create/map it per your version’s capabilities).
Version note: In some versions, adding a custom term in Work 365 can auto-create the matching Dynamics option; in others you’ll add the option to paymenttermscode first, then map it in Work 365.
Troubleshooting Edge Cases
Trailing/leading spaces: Hidden whitespace in the contract term will fail the match—clean it up.
Localization: If you localize terms (e.g., “30 jours net”), create distinct mappings for each language variant used on contracts.
Duplicates: Avoid multiple mappings pointing at the same Dynamics term name to reduce ambiguity.
Security: You’ll need rights to edit Work 365 Configuration and (if required) customize Dynamics 365 fields/options.
Summary
This error indicates a mapping gap between the Billing Contract’s Payment Terms and Work 365’s Payment Terms configuration. Add or correct the exact term in Admin Hub → Payment Terms (and ensure it maps to a valid Dynamics payment term), then re-run invoice generation. No data corruption is implied—this is a configuration fix.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article