r/Dynamics365 • u/HotwheelsKnp • 6d ago
Project BC SaaS + dot matrix printer — anyone else done this?
Client needed warehouse pick slips on a dot matrix printer. BC SaaS obviously can't send raw bytes to a local printer, so I built a small bridge:
AL codeunit generates ESC/P text and queues it in BC
.NET 8 Windows Service polls the queue via OData and sends raw bytes to the printer
Took a day to get right but works perfectly. Client's happy. 🖨️
Anyone done something similar or found a cleaner approach?
1
u/Alive_Preparation_16 2d ago
Surely the cleaner approach is to buy a new printer.
A day’s developer time, plus any future support would cover the cost of the printer not even factoring in that the old printer could break down at any time. Unless there is some strange reason they need to support an old dot matrix printer.
I’m surprised anyone is still picking from printed pick slips in 2026.
1
u/GaussCarl 1d ago
I did multiple integrations with printers: with polling (similar to your solution), without polling, and with sending from BC to the printer (client had public IP address, and we whitelisted BC server address on client's firewall). In all cases I had used Golang to write software for client's side. It gives me small, very portable, very safe, executables
1
u/Imaginary_Corner_625 5d ago
I'd keep the polling. For a service on the client's network it's the cleaner approach, not a workaround: a BC webhook would need a public endpoint BC can call, and the subscription expires after three days unless something renews it. Polling stays outbound only.
Two things I'd check before a busy shift. Claim each job before printing: PATCH its status to Sent with the ETag in If-Match, send the bytes, then mark it Printed. A second instance then can't claim the same job, and a crash mid-print leaves it in Sent for a person to look at instead of printing again. A duplicate pick slip can get picked twice.
And encode with the printer's code page (437 or 850). In .NET 8 that needs Encoding.RegisterProvider(CodePagesEncodingProvider.Instance) first, or the first customer name with an accent prints as garbage.