try adding “special = BarCodeScan” to the field you wanted to add the barcode feature
add screen <screenName> { add container "<containerName>" { add field "<fieldName>" { special = BarCodeScan } } }
What error is it showing you when it’s in the field? Outside of the field, it’s missing the container, so those errors would be expected.
Your field must be defined in the ASPX as a textedit.
You can try to set ForceType to "String" for the InventoryID field to replace selector with a text edit. This will allow you to type values directly on the form, but you will lose all selector functionality, like searching for records. However you do have the PickerType set to searchable.
I understood the error. Thank you all for your help. I resolved using other way. I deploy the inventory lookup within the sales order and use the barcode field in the parameters adding the attribute in the field “special = BarCodeScan”
sorry @jamesh , the code you sent me has to be within the Inventory ID field?
And if I put them outside the field inventory ID, appears this errors:
Line 138: Can't use entity type 'containerAction' in current context.
Line 142: Can't use entity type 'recordAction' in current context.
Line 145: Can't use entity type 'recordAction' in current context.
Line 148: Can't use entity type 'recordAction' in current context.
Thank you @natesansivarama44 . It worked in a field that didn’t has any attributes but when i tried to applied to a field that has attributes like the inventory ID, it doesn’t work. What I found is that, even if I delete the attributes that could be affecting (like selectorDisplayFormat = Ke, pickerType = Searchable) when I saved it, the xml is forced with the original attributes. For example:
I tried to remove the attributes SelectorDisplayFormat = Ke, pickerType = Searchable and leave the special = Barcode but when I saved it, the code is “restored” and those lines appeared again with the special = Barcode
do you know why?
fyi...i want to use the barcode to search an inventory ID.