• srihari Nadendla 22
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

Hi all,
I am new to the trigger,Please help me for the error
I have searched all the forums but i couldnt find the answer
trigger OP on Opportunity (after insert)
{
    List<Account> acc=new List<Account>();
    for(Opportunity anu:Trigger.new)
   
    {
        if(anu.OrderNumber__c==111)
        {
            Account at=new Account();
            at.Ownership='Public';
            acc.add(at);
        }
    }
    insert acc;
}