Solved

Barcode button in mobile app

  • 14 January 2022
  • 7 replies
  • 341 views

Userlevel 4
Badge

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

icon

Best answer by rodrigocid34 14 March 2022, 17:26

View original

7 replies

Userlevel 4
Badge

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”

Userlevel 4
Badge

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.

Userlevel 5
Badge +1

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.

Userlevel 4
Badge

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.

Userlevel 5
Badge +1

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

 

Userlevel 4
Badge

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.

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

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved