Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //A Utility class to process Stock Item records from the Stock Item Handler
- public with sharing class StockItemHandler {
- public static list<Stock_Item__c> getLowStockInventory(){
- //Query items where stock on hand is less than the minimum stock level
- List<Stock_Item__c> lowInventory = [Select id,name,Item_Name__c,Item_Stock_Is_Low__c,Minimum_Stock_Level__c,Stock_On_Hand__c from Stock_Item__c where Item_Stock_Is_Low__c=true];
- system.debug('Low Inventory Count: '+lowInventory.size());
- return(lowInventory);
- }
- //Create methods here to handle the before insert, before delete and utility processes described in the requirements
- //They should accept lists of Stock_Item__c records from the trigger
- }
Add Comment
Please, Sign In to add comment