Skip to main content
Solved

Deleting product from related items

  • 17 July 2024
  • 3 replies
  • 58 views

Hi all. I am currently working on a scenario to remove a specific product from the Related Items tab. Although I have developed a method that successfully deletes a line, it unfortunately only removes the top line and does not allow for specification based on the Inventory ID. The product in question is associated with multiple products and appears on various lines within these entries. Any help on this would be appreciated. Thanks

 

3 replies

Badge +18

Hello @beverleykerr ,

Welcome to Acumatica Community!

I think using @@ in your import scenario could help you. To delete a specific line from related items,  use @@ to identify a specific line and take specific actions on that line.

Here is a link to a prior post that uses @@ to identify and update a specific line of a Sales Order.  I like @Naveen Boga ‘s explanation of how @@ works. Naveen said:

Just FYI...basically, @@InventoryID is used to search for a detail line by the value of the SKU and based on this KEY field system will update the Document Line.

In your case, @@ will be used to search for the key fields on the Related items tab of stock Items, in order to remove them.

 

Laura

Userlevel 7
Badge +8

Hi @beverleykerr ,

You should uncheck the row on you import scenario where <Line Number> is 0.  Add a row to lookup the row based on the Inventory ID of the related product.  The arrow syntax (i.e. Inventory ID → Inventory ID) indicates that this line of the import scenario is a lookup. 

Note that the main item lookup is by inventory code, however the related item lookup on the grid uses the integer inventory id.  In your GI you can make sure to pass in the integer value by using a formula.  Otherwise the schema will return the InventoryCD and the lookup won’t work.

 

Hope this helps!

Laura

Userlevel 5
Badge +1

Hello @beverleykerr 

Here’s a link for a webinar where you can find instructions on how to delete rows from a grid with an import scenario.

You will fin an example under minute 57:58 (Delete Row from a grid):



Hope this helps.

Reply