Skip to main content

Hi!

Does anybody knows how I can re-use the barcode function (button) that is in most warehouse management screens within the mobile app?

I want to put that object in the sales order screen in the mobile app so it help me to find inventory ID using barcodes.

Thanks!!

@rodrigocid34 - Try inserting the following parameters to your code and see if that helps: 

  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
}

 


Hello @rodrigocid34 ,

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?

update field "InventoryID" {

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 } }

Because it shows me some errors.

 

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.


This is the code:

update field "InventoryID" {
        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
  }
  }

And these the errors:

Line 14:
Can't use entity type 'containerAction' in current context.

Line 18:
Can't use entity type 'recordAction' in current context.

Line 21:
Can't use entity type 'recordAction' in current context.

Line 24:
Can't use entity type 'recordAction' in current context.

Line 153:
Can't use entity type 'containerAction' in current context.

Line 157:
Can't use entity type 'recordAction' in current context.

Line 160:
Can't use entity type 'recordAction' in current context.

Line 163:
Can't use entity type 'recordAction' in current context.


Reply