2. Before a Stock Item is deleted, make sure that the stock on hand is at 0. If it is not, Create a case so that someone is alerted.
The case should indicate the name of the item that was deleted, the id, and the number of stock that were on hand when it was deleted in the description. The rest of the case can be configured however you think best.
You can check out your Week 6 Bulkification homework on the AccountTrigger for an example of a similar pattern.
2. Before a Stock Item is deleted, make sure that the stock on hand is at 0. If it is not, Create a case so that someone is alerted.
The case should indicate the name of the item that was deleted, the id, and the number of stock that were on hand when it was deleted in the description. The rest of the case can be configured however you think best.
You can check out your Week 6 Bulkification homework on the AccountTrigger for an example of a similar pattern.