Bar code Integration with Business Central



The bar code scanner scans the bar code. The Item No. against which the bar code is assigned should be populated on Sales Line Subform.


  1. The mouse cursor is on Sales Line sub form field No. and Bar code scanner scans a bar code.Once the bar code is scanned a Serial No. is populated on No. field of Sales Line sub form
  2. Customization should be done to fetch against which Item No. in Business Central  the Serial No. is assigned. The No. field in Sales Line sub form is replaced with the Item No, Location and Quantity from Item Ledger Entries.
  3. If the Item No is already present and cursor is again on the No. field and Bar code scanner scans again then the quantity will be plus 1


  • BarCode Scanner
  • Business Central
  • Bar code generated for Item No.


  1. Open Items page, assign Item Tracking.


2. Create a Purchase Order and assign Item Tracking Lines and post them. Here Item tracking Lines is assigned against Item No 1000


3. Now generate Bar codes for these Serial Nos. using Online tools.

4. Copy the bar codes to a word document and take a print out. Below is a copy of word docx.


5.  Below is the code attached to fulfill the requirement



Here code is written on AfterValidate trigger for Location code because on validation of No. field the Location of subform is assigned the Location code of  Header.

6. Open Sales order and keep your cursor on No. field of Sales Line sub form. Scans the bar code



Happy Weekend!




3 thoughts on “Bar code Integration with Business Central

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s