Solved

Create Auto-Incremented 6-digit Code for each Stock Item Upon Creation - Business Event?

  • 28 July 2023
  • 5 replies
  • 71 views

Userlevel 3
Badge

Hi, we’re onboarding Acumatica now and would like to confirm this is possible. That is, can we use a Business Event or other functionality in Acumatica to automatically create a 6-digit Alternate ID upon creation of a Stock Item that would serve as a barcode? We would need to it to auto-increment so that it’s unique. 

icon

Best answer by manikantad18 28 July 2023, 20:17

View original

5 replies

Userlevel 7
Badge +12

Hi @lawsont 

What are you trying to Update the barcode, Are you looking to Pass same Inventory ID as alternative ID?

Thanks

Userlevel 3
Badge

@manikantad18 Our Inventory ID is alphanumeric and up to 30 characters, so we’d like to avoid printing barcode labels from the Inventory ID. Ideally, we can create a 6-digit code that is associated with the stock item that can be printed onto a label and applied to the product. 

Userlevel 7
Badge +12

Can you give me one example 

How Inventory ID created and how would like to update the barcode ?

Userlevel 6
Badge +6

@lawsont , provided that you will have only 1 barcode per stock item, I would approach it this way:

  1. Create a generic inquiry that shows all stock items. Use InventoryItem table, filter on IsStk, left join INItemXRef, filter on the type “B”. In the generic inquiry, show InventoryID, InventoryCD, and INItemXRef.AlternateID.
  2. Set up your Business Even to run every minute, using the data from that generic inquiry, but only picking up lines where AlternateID is empty.
  3. Set up your Import Scenario (from the Business Event) to use the InventoryID value (it’s always an integer), pad it with zeros on the left, and write it to the AlternateID field.

I’m pretty sure this will work. As for the auto-increment, you can definitely do that, but it would require custom code. Hope this helps.

Userlevel 7
Badge +12

@lawsont , provided that you will have only 1 barcode per stock item, I would approach it this way:

  1. Create a generic inquiry that shows all stock items. Use InventoryItem table, filter on IsStk, left join INItemXRef, filter on the type “B”. In the generic inquiry, show InventoryID, InventoryCD, and INItemXRef.AlternateID.
  2. Set up your Business Even to run every minute, using the data from that generic inquiry, but only picking up lines where AlternateID is empty.
  3. Set up your Import Scenario (from the Business Event) to use the InventoryID value (it’s always an integer), pad it with zeros on the left, and write it to the AlternateID field.

I’m pretty sure this will work. As for the auto-increment, you can definitely do that, but it would require custom code. Hope this helps.

Adding sample Business event to kick start on this

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