---
id: post/yzhums-com/70008
type: post
title: "Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL)"
summary: Business Central version 24 introduced barcode scanning APIs using control add-ins to replace .NET-based APIs, enabling developers to add scan actions and continuous scanning to custom pages via the CameraBarcodeScannerProviderAddIn control add-in.
tier: community
language: en
tags:
  - barcode scanning
  - control add-ins
  - mobile app
  - al development
  - api
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:41:18.031Z"
  flags: []
generated:
  at: "2026-10-26T05:51:10.938Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 12b7086fcbb6feff5990ca0b6193e3154c7ad7f30bb318f9adac85a5442adb3b
evidence:
  - kind: blog
    url: https://yzhums.com/70008/
    title: "Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL)"
    date: "2026-01-15"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://yzhums.com/70008/
    title: "Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL)"
    date: "2026-01-15"
    commit: null
    t: null
    quote: Version 24 introduced barcode scanning APIs based on control add-ins to replace the .NET-based APIs.
  - kind: blog
    url: https://yzhums.com/70008/
    title: "Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL)"
    date: "2026-01-15"
    commit: null
    t: null
    quote: This means we can add scan barcode actions and multiple scanning functions to our own extensions.
  - kind: blog
    url: https://yzhums.com/70008/
    title: "Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL)"
    date: "2026-01-15"
    commit: null
    t: null
    quote: Enabling multiple scans is also very simple; just remove the comments from step 5 in the sample.
links:
  learn: []
  objects:
    - object/enum/8761
    - object/table/36
    - object/table/37
    - object/table/6505
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-mobile-app-barcode-scanning
      title: Barcode scanning in mobile app
      label: possibly related
      why: names Enum 8761 "BarcodeFailure"
      by: code
    - to: post/thatnavguy-com/https-thatnavguy-com-blog-2025-bc-friday-tips-56-understand-missing-fields-in-copy-documents--e98f782aea
      title: "BC Friday Tips #56 Understand Missing Fields in Copy Documents"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/thatnavguy-com/https-thatnavguy-com-blog-2026-bc-friday-tips-84-item-missing-from-sales-line-lookup--ac89a8fbc6
      title: "BC Friday Tips #84 Why Is Your Item Missing from the Sales Line Lookup?"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/kine-cz/https-blog-kine-cz-posts-bcdevelopmentserie-02b--0078d7faba
      title: "Business Central Development Serie - Part 2b: AI for BC Development — The Knowledge Gap That Ships to Production"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/56173
      title: "Dynamics 365 Business Central: Entering Quantities/Amounts by Calculation and Negative Numbers"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/74172
      title: "Dynamics 365 Business Central: How to flow/pass custom field values from Sales Order to Production Order"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/25134
      title: "Dynamics 365 Business Central: How to note the records that the user has selected on the Subpage/Lines (Page.SetSelectionFilter in part)"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/64478
      title: "Dynamics 365 Business Central: How to quickly check if a field is a primary key field"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/70415
      title: "Dynamics 365 Business Central: How to run a Report in Preview Mode without the Request Page (Hide Request Page)"
      label: possibly related
      why: both name Table 6505 "Lot No. Information"
      by: code
    - to: post/yzhums-com/31884
      title: "Dynamics 365 Business Central: Quickly get next Sequence/Entry Number (without using FindLast -> Entry No. + 1)"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
post_id: "70008"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/70008/
published_at: "2026-01-15T04:38:03.000Z"
author: Yun Zhu
full_text: false
words: 1312
quotes:
  - text: Version 24 introduced barcode scanning APIs based on control add-ins to replace the .NET-based APIs.
    why_it_matters: Marks the shift to the recommended approach for implementing barcode scanning in custom extensions
  - text: This means we can add scan barcode actions and multiple scanning functions to our own extensions.
    why_it_matters: Enables developers to create custom barcode scanning capabilities beyond standard Business Central functionality
  - text: Enabling multiple scans is also very simple; just remove the comments from step 5 in the sample.
    why_it_matters: Shows that continuous scanning requires minimal code changes, making it practical for real-world scenarios
code_objects_mentioned:
  - other CameraBarcodeScannerProviderAddIn
  - enum BarcodeFailure
  - table Sales Header
  - table Sales Line
  - table Lot No. Information
systems:
  - sales
  - development
versions_mentioned:
  - 2023 wave 2
  - "24"
cautions:
  - kind: gotcha
    quote: Sometimes it displays the previous result, I'm not sure if it's a bug.
    objects:
      - type: other
        name: CameraBarcodeScannerProviderAddIn
    events:
      - BarcodeAvailable
    versions: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2026/01/Snipaste_2026-01-15_13-37-05.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:10:18.691Z"
---

# Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL)

[Read the post](https://yzhums.com/70008/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2026-01-15 · 1312 words · tier community · reviewed (checked by Opus)

> Business Central version 24 introduced barcode scanning APIs using control add-ins to replace .NET-based APIs, enabling developers to add scan actions and continuous scanning to custom pages via the CameraBarcodeScannerProviderAddIn control add-in.

## Key points

- Setting ExtendedDatatype to Barcode on a table or page field shows a scan button in the mobile app.
- From version 24, the CameraBarcodeScannerProviderAddIn control add-in replaces the .NET barcode APIs, which were on-premises only, for custom scan actions.
- Call RequestBarcodeAsync from an action and handle the ControlAddInReady, BarcodeAvailable and BarcodeFailure triggers.
- Calling RequestBarcodeAsync again inside BarcodeAvailable turns on continuous scanning.
- Example: a Sales Order action scans Lot No. barcodes and adds the matching item as sales lines.

## Quotes

- "Version 24 introduced barcode scanning APIs based on control add-ins to replace the .NET-based APIs." (Marks the shift to the recommended approach for implementing barcode scanning in custom extensions)
- "This means we can add scan barcode actions and multiple scanning functions to our own extensions." (Enables developers to create custom barcode scanning capabilities beyond standard Business Central functionality)
- "Enabling multiple scans is also very simple; just remove the comments from step 5 in the sample." (Shows that continuous scanning requires minimal code changes, making it practical for real-world scenarios)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- other "CameraBarcodeScannerProviderAddIn"
- [enum 8761 "BarcodeFailure"](../../objects/enum/8761.md)
- [table 36 "Sales Header"](../../objects/table/36.md)
- [table 37 "Sales Line"](../../objects/table/37.md)
- [table 6505 "Lot No. Information"](../../objects/table/6505.md)

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Barcode scanning in mobile app](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-mobile-app-barcode-scanning) — possibly related: names Enum 8761 "BarcodeFailure"
- [BC Friday Tips #56 Understand Missing Fields in Copy Documents](../../posts/thatnavguy-com/https-thatnavguy-com-blog-2025-bc-friday-tips-56-understand-missing-fields-in-copy-documents--e98f782aea.md) — possibly related: both name Table 37 "Sales Line"
- [BC Friday Tips #84 Why Is Your Item Missing from the Sales Line Lookup?](../../posts/thatnavguy-com/https-thatnavguy-com-blog-2026-bc-friday-tips-84-item-missing-from-sales-line-lookup--ac89a8fbc6.md) — possibly related: both name Table 37 "Sales Line"
- [Business Central Development Serie - Part 2b: AI for BC Development — The Knowledge Gap That Ships to Production](../../posts/kine-cz/https-blog-kine-cz-posts-bcdevelopmentserie-02b--0078d7faba.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: Entering Quantities/Amounts by Calculation and Negative Numbers](../../posts/yzhums-com/56173.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: How to flow/pass custom field values from Sales Order to Production Order](../../posts/yzhums-com/74172.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: How to note the records that the user has selected on the Subpage/Lines (Page.SetSelectionFilter in part)](../../posts/yzhums-com/25134.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: How to quickly check if a field is a primary key field](../../posts/yzhums-com/64478.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: How to run a Report in Preview Mode without the Request Page (Hide Request Page)](../../posts/yzhums-com/70415.md) — possibly related: both name Table 6505 "Lot No. Information"
- [Dynamics 365 Business Central: Quickly get next Sequence/Entry Number (without using FindLast -> Entry No. + 1)](../../posts/yzhums-com/31884.md) — possibly related: both name Table 37 "Sales Line"

## Heads up

- gotcha: "Sometimes it displays the previous result, I'm not sure if it's a bug." (about other CameraBarcodeScannerProviderAddIn, BarcodeAvailable)

## Context

- Features: Barcode scanning via camera, Control add-in based APIs, Continuous scanning, Mobile app barcode support, RequestBarcodeAsync method, ControlAddInReady event, BarcodeAvailable event
- Versions: 2023 wave 2, 24

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
