You need to sign in to do that
Don't have an account?
Aryan Jha
i have an error
trigger leadwithaccount on Lead (before insert) {
List<Lead>leadwithdata=new List<Lead>();
for(Lead l:Trigger.new)
{
if(l.AnnualRevenue=50000)
{
l.adderror('amount is less');
leadwithdata.add(l);
}
}
insert leadwithdata;
}
List<Lead>leadwithdata=new List<Lead>();
for(Lead l:Trigger.new)
{
if(l.AnnualRevenue=50000)
{
l.adderror('amount is less');
leadwithdata.add(l);
}
}
insert leadwithdata;
}
Please elaborate your questions .Specify the error which you are getting.
Thanks!
#SampleCode
trigger leadwithaccount on Lead (before insert) {
for(Lead l:Trigger.new)
{
if(l.AnnualRevenue < 50000)
{
l.adderror('amount is less');
}
}
}
If it helps mark it as best Answer.
Thanks!
Greetings!
Please try this code.
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi