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
Aryan JhaAryan Jha 

Method does not exist or incorrect signature: void triggeronoppandcontact(List<Opportunity>) from the type oppsoftrigger at line 2 column 15

public class oppsoftrigger1
{
public static void triggeronoppsandcontact(List<Opportunity>opp)
{
List<Contact>conlist=new List<Contact>();
List<Opportunity>oppslist=new List<Opportunity>([SELECT Id,Name,CloseDate FROM Opportunity WHERE CloseDate=TODAY AND Id IN:Trigger.new]);
for(Opportunity o:opp)
{
Contact c=new Contact();
c.FirstName='neha';
c.LastName='mehra';
c.AccountId=o.AccountId;
conlist.add(c);
}
insert conlist;
}
}
Then i make a trigger on opportunity
trigger oppsontrigger on Opportunity (after insert) {
oppsoftrigger.triggeronoppandcontact(Trigger.new);
}
AnudeepAnudeep (Salesforce Developers) 
should it be oppsoftrigger1.triggeronoppandcontact(Trigger.new); ? Please verify the classname
Aryan JhaAryan Jha
Thanks for the response it help me to solve my query
AnudeepAnudeep (Salesforce Developers) 
Hi Aryan - You are welcome. Please mark the answer as Best so that it can help others in the community and to also close-loop this post