Skip to main content
Solved

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

  • September 14, 2021
  • 5 replies
  • 473 views

martingaxiola
Varsity I
Forum|alt.badge.img

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!

 

Best answer by riglesias

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.

View original
Did this topic help you find an answer to your question?

5 replies

Forum|alt.badge.img

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


riglesias
Acumatica Employee
Forum|alt.badge.img+2
  • Acumatica Employee
  • 93 replies
  • Answer
  • September 14, 2021

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.


Forum|alt.badge.img

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.


martingaxiola
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • 109 replies
  • September 15, 2021

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


wgnel35
Freshman I
  • Freshman I
  • 3 replies
  • November 11, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings