Published at: 2025-10-31
Equipment Barcode (Other Barcode Machine Generated)
1. Device Code Field Maintenance
- Pre-configure the “QR Code/Barcode (API Name:
device_code)” field on the Device object with value assignment rules. Both QR code/barcode generation and scanning recognition rely on this field. - Note: For legacy systems, the field might be labeled as “Equipment SN.”
- If the device barcode has already been generated in another system, simply enter or synchronize the barcode into the “QR Code/Barcode” field when creating new device records. This will enable scanning recognition.
picture coming soon:
2. Device Code (Barcode) Use Cases
2.1 Scanning to Associate Devices in Generic Objects
- For fields like “Associated Device” in objects such as Work Order or Spare Part Consumption, enable the scan-to-add feature. The system can recognize the device Code and associate it by invoking the UI function.
```java
// Supports scanning device barcodes
// Example uses the field_97ZrY__c field on Work Order; replace as needed
// Retrieve scanned data
String deviceContent = context.data.field_97ZrY__c;
Map map=[:]
if (deviceContent != null) {
// Query device by barcode
APIResult ret = Fx.object.findOne(“DeviceObj”,
FQLAttribute.builder()
.columns([“_id”, “name”]) // Return ID and name
.queryTemplate(QueryTemplate.AND([“device_code”: QueryOperator.EQ(deviceContent)] ))
.build(),
SelectAttribute.builder()
.build());
log.info(“ret :” + ret)
if (ret.data != null) {
String dataId = ret.data[“_id”] as String;
map=[“field_97ZrY__c”:dataId];
}
}
UIEvent event = UIEvent.build(context){
editMaster(map)
}
return event
```
picture coming soon:
2.2 External Terminal User Barcode Scanning for Device Lookup
Prerequisites:
- Enable Service Connector for Terminal users.
- Grant Roles (e.g., Terminal users or guests) access permissions for the Device object. To allow guest users to scan and query all devices, set the Device object’s data permissions to Public. (Business Objects and Role Permissions)
- External users can associate devices by scanning barcodes when submitting a Work Order.
picture coming soon:
- Use the Query Tool to manually enter text or scan barcodes for searches. (Terminal User Query Tool)
picture coming soon:
picture coming soon: