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

Test Code Coverage for OpportunityShare

Is it possible to write TestCode to check if an OpportunityShare was created?

I have the below code in  a trigger:

  temp_opp_share = new OpportunityShare(OpportunityAccessLevel='Edit', UserOrGroupId=o.Channel_Specialist__c, OpportunityId=o.Id);
            insert temp_opp_share;

Now I need to write test code to see if the OpportunityShare does indeed get created.

How would I do this?