function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Major1507Major1507 

Custom trigger and test case

I have a scenario where I have a custom object "Stock Count" that has a lookup to product and a number field. 
I'm creating an opportunity with amount - 4 and adding a line item for the smae product.
I need to write a trigger that updates the stock number from 10 to 6 as we are selling 4.
I also need a test class showing positive, negative, bulk and user profile test.
PriyaPriya (Salesforce Developers) 

The developer community recommends providing any attempts/code you've started, any errors you're getting, or where exactly you're struggling in achieving this while posting a question.