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

Programmatically adding a product to an opportunity

I'm trying to build a test class for a class that modifies the price of a product on an opportunity. This requires programmatically adding a product to an opportunity I made in my test class. I made the opportunity, but I don't know how to add a product to it.