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
sruthi.458sruthi.458 

test code

Hi friends,

can any one post test code for the below trigger.


trigger trg5 on Opportunity (before insert) 

{
  for(opportunity o:trigger.new)
  {
    if(o.amount>2500000)
     o.adderror('not inserted');
     }
}

Regards,
Srikanth

admintrmpadmintrmp

I've noticed you've asked several times for test code now. It's worth noting that there is documentation on how to write test code.