You need to sign in to do that
Don't have an account?
Anant Pandey 8
@isTest for Contact Trigger
Please suggest me Test Class for below Trigger
trigger ContactToOpportunity on Contact (After insert) { List <Opportunity> Opps = new list<Opportunity>(); for (Contact c: trigger.new ){ Opportunity o = new Opportunity (Name = c.FirstName, CloseDate = system.today().addmonths(1), StageName = 'Prospecting' ); Opps.add(o); } Insert Opps; }
Please mark as the best answer if it helps. Thanks!