Announcements
I agree with @Abhishek easiest way is to add a line with 100% discount. If you want that free line to be created automatically, you can achieve it with a small code customization.
// Event Subscriber on Sales Line Insert OnAfterInsertSalesLine(SalesLine: Record "Sales Line") begin // Check if the item qualifies for free item if (SalesLine.Type = SalesLine.Type::Item) and (SalesLine.Quantity >= 10) then begin FreeLine.Init(); FreeLine."Document Type" := SalesLine."Document Type"; FreeLine."Document No." := SalesLine."Document No."; FreeLine."Line No." := GetNextLineNo(SalesLine); // helper function to fetch next line no. FreeLine.Type := SalesLine.Type::Item; FreeLine."No." := SalesLine."No."; // Same item FreeLine.Quantity := 1; FreeLine."Unit Price" := SalesLine."Unit Price"; FreeLine."Line Discount %" := 100; // make it free FreeLine.Insert(true); end; end;
✅ Mark this as the verified answer if helpful.
Hi,
Applying a 100% line discount may seem like the obvious solution, it doesn’t always render clearly on the invoice layout, especially when customers expect to see a distinct line showing the free item.
Here’s how to approach it:
Option 1: Add a Separate Line with Zero Price
Option 2: Use a Non-Inventory Item for Free Goods
Option 3: Customize the Invoice Layout
Option 4: Use Item Charge (Type = Charge (Item))
Helpful Reference Assign item charges to sales and purchases – BC How to Credit an Item Without Putting it Back in Inventory – Valentin Castravet BC Promotions and Free Goods Setup – Dynamics 365 Lab If you find this helpful, feel free to mark this as the suggested or verified answer. Cheers Jeffrey
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 572 Super User 2026 Season 2
YUN ZHU 331 Super User 2026 Season 2
Grigorios Mavrogeorgis 330 Super User 2026 Season 2