Enabling Barcode Scanner in Mobile App

Acumatica ERP includes access to the Acumatica Mobile Application. The mobile app provides mobile users an easy way to access information in Acumatica, including the ability to process approvals. When I took the T400 series of classes last year, I was excited to see that there was a way to enable accepting customer signatures via the mobile app. Then we were shown something that made me (with an inventory background) begin to drewl… the ability to scan a barcode (QR or 3 of 9) with the camera on my phone or tablet.

Although I could not find it in the Mobile Framework Developer Guide, a little digging into the Warehouse Management screens within the Mobile Application section of the customization project yielded the key to including this functionality on your own screens.

To enable barcode scanning from the mobile app, simply define a plain text field on the screen (My field is called MyBarcode) and then add it to the Mobile App screen with the special parameter “special = BarCodeScan” as shown below.

add screen ZZ301000 {
    add container "ScanContainer" {
	add field "MyBarcode"
	{
	  special = BarCodeScan
	}
	add containerAction "Insert" {
	  icon = "system://Plus"
	  behavior = Create
	}
	add recordAction "Save" {
	  behavior = Save
	}
	add recordAction "Cancel" {
	  behavior = Cancel
	}
	add recordAction "Insert" {
	  behavior = Create
	}
    }

}

Once published, the field will contain a barcode icon. When tapping on the barcode icon, the barcode reader window will expand open in the mobile app so that the camera attempts to read a barcode. The barcode icon appears in the field below (called Description in the image.)

Upon clicking the barcode icon, simply line up the barcode in the viewfinder and tap the screen to “scan” the barcode to record the value scanned into the field.

Happy coding!

Leave a Reply