How to get the transactions of stock item, programmatically?

Hi All,

I have an inactive stock item that have not been use for so long (>2 years) and the known transactions has already been archived. My customer would like to remove it from the system. But we encounter this error as attached. So I attempt to delete it programmatically but receive the same error.

How can I get all of the transactions related to this stock item and delete it programmatically?

Parents Reply
  • 0 in reply to Stu Mc

    Hi Stu, thank you for the reply. I have read the resolution and it says to "take appropriate action in Sage 200". That means I will have to get the transaction and let customer do action on it.

    What if I force delete these transaction using SQL script, then I should be able to delete the stock item, correct?

Children
  • 0 in reply to murni

    Hi, the quantity in stock should really be removed from the front end in Sage 200 using the write off stock or Stock take options, as this will handle the database entries. Looking at this from a database point of view there's a number of tables which would need to be cleansed, I can't offer any advice in that respect due to the scope of tables you'd need to consider checking and cleansing.