Solved

BOM Import to delete materials from a WorkCenter will show error due to attempt to duplicate

  • 14 September 2021
  • 5 replies
  • 382 views

Userlevel 5
Badge

Good day,

 

I am trying to delete a Non-Stock Item from several BOMs, but the mapping that I have is giving me an error “Field: Operation ID, Value: 0020, Error: An attempt was made to add a duplicate entry.”, and I have the Line Number = 0, to not create any other lines, just to identify the material that needs to be deleted.

Any ideas why this will try to create a record instead of following the mapping to delete the Material?

Thank you so much!

 

icon

Best answer by riglesias 14 September 2021, 18:23

View original

5 replies

Userlevel 3
Badge

You have to use the search (something like @@OperationID) to find the operation and possibly the inventory id.

Userlevel 4
Badge +1

Hello Martin,

 

If you map Hold=False the BOM status will be Active and this will disable Delete Row button from Materials. So if the BOM status is on Hold omit this line and if it’s Active then map it as Hold=True.

 

For Operations and Materials you need to setup a custom key by using the @@ notation.

For this I setup a couple of custom key fields.

First one (@@OperationCD) lets the system know the operation where you need to delete the Materials from.  (Notice I deactivated <Line Number> line mapped to =-1. This line is the one that adds a row but in this case we need to select the row instead of adding a new one)

Second key (@@InventoryID) lets the system know which line to delete based on the Inventory ID. (For this one I mapped <Line Number> to =-2 which is the same as when you click on Delete Row button).

 

 

Hope it helps.

Userlevel 3
Badge

You do not have to place the bill of material on hold to update it with an import scenario - it was designed that way otherwise you would need to run another scenario to put them back on hold.

Userlevel 5
Badge

The solutions worked like a charm. Thank you so much!

Hi All, 
 

I used this import scenario to Delete Materials from my BOMS where I had multiples of the same Inventory ID.

I Only wanted to delete some lines and thus used a Generic Inquiry with Conditions to identify specific Material Lines to delete using the @@LineID instead of the Inventory ID.

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