Applies To: Dynamics 365 / Work 365 Billing
Audience: System Administrators, Billing Teams, Customization Engineers
Overview
In Work 365, subscription-level discounts apply uniformly to charges and refunds. When a discounted subscription is refunded, the refund line also carries the discount, which produces a negative discount value on the Invoice Product (Invoice Line).
By default, Dynamics 365 blocks negative values in the Manual Discount (line-level) field, which can cause invoice creation or posting errors.
Goal: Update the Manual Discount field on Invoice Product to permit negative values so discounted refunds post cleanly.
Prerequisites
Security role: System Administrator or System Customizer
A non-production environment for first-time validation (recommended)
Basic familiarity with Solutions and entity field customization in Dynamics 365
Steps to Enable Negative Discounts
Open Customizations
Go to Settings → Advanced Settings → Customizations → Solutions.
Create/open an unmanaged solution (e.g., Work 365 Unmanaged Customizations).
Add the Invoice Product entity (fields only)
In the solution, select Add Existing → Entity.
Choose Invoice Product (Invoice Line).
Select Fields only and click Finish.
Edit the line-level Manual Discount field
Expand Invoice Product → Fields.
Open Manual Discount (the line-level money field; schema name typically
manualdiscountamount).Set Minimum Value to a sufficiently low negative number, e.g.
Save & Close.
✅ This change allows Dynamics 365 to accept negative line-level discounts so Work 365 refund lines that carry discounts won’t fail.
Publish
Back in the solution, select Invoice Product and click Publish All Customizations.
Wait for the publish confirmation.
Validate the Change (Quick Test)
Create (or locate) a test Billing Contract + Subscription with a percentage discount (e.g., 10%).
Process a refund (e.g., deactivate/apply refund or create a negative NRI that triggers a refund line).
Generate the invoice and open an Invoice Line.
Confirm:
Manual Discount on the line can be negative.
Totals (line and invoice) calculate correctly.
Important Considerations
| Area | Recommendation / Notes |
|---|---|
| Integration compatibility | Confirm downstream ERP/accounting connectors can handle negative line discounts. Some systems treat them as negative revenue; others expect a credit memo or a negative line amount with zero discount instead. |
| Invoice templates | Make negative discounts visually clear (e.g., “–$50 Discount” or “Refund Adjustment”). |
| Precision | Ensure the money precision on the field aligns with your currencies (typically currency precision, not necessarily 4 decimals). Totals should match accounting expectations. |
| Testing | Always validate in sandbox/UAT first (generate a sample discounted refund and post end-to-end through your integrations). |
| Upgrades | After Dynamics/Work 365 updates, re-confirm the Minimum Value wasn’t reset by metadata changes. |
| Scope | This change affects all apps using the core Invoice Product line. If your org has custom logic around discounts, validate those scenarios as well. |
Alternatives (If Your ERP Can’t Accept Negative Discounts)
Flatten the discount into the line amount: Post the refund line with the final negative amount and set Manual Discount = 0 (requires custom logic/automation).
Use a credit memo pattern: Some ERPs prefer a separate credit document instead of a negative discount on the line. Align with your finance team’s policy.
Rollback (If Needed)
Reopen the Manual Discount field and set Minimum Value back to 0.
Publish All Customizations.
Re-test invoice creation.
Best Practices
Document the change in your customization log (solution, date, author, reason, testing notes). Suggested name: Work 365 Refund Discount Customization.
Add a regression test for discounted refunds to your upgrade checklist.
Periodically audit refund invoices to confirm negative discounts are posting as intended.
FAQs
Q: Which discount field is this?
A: The line-level Manual Discount on Invoice Product (invoicedetail.manualdiscountamount), not the invoice header discount.
Q: Will this change affect normal (non-refund) invoices?
A: No—those typically carry positive or zero discounts. Allowing negatives only expands what’s permitted; it doesn’t force negative values.
Q: Do I need to change anything in Work 365?
A: No changes in Work 365 are required. This is a Dynamics attribute configuration that enables Work 365’s refund lines with discounts to post without error.
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