You need to sign in to do that
Don't have an account?
prasanth kumar
simple account update is not working. please help
hi i worte a simple update of record in account object using developer console. i am getting this error:--- "unexpected token: account" at line 4;
public class updatename {
public updatename()
{
list<account> accs=[select name form account where name='GenePoint'];
for(account a:accs)
{
a.name='Jaffa point';
}
update accs;
}
}
public class updatename {
public updatename()
{
list<account> accs=[select name form account where name='GenePoint'];
for(account a:accs)
{
a.name='Jaffa point';
}
update accs;
}
}
Try Below code. you have a small typo.
Thanks,
Himanshu
All Answers
Try Below code. you have a small typo.
Thanks,
Himanshu
public class updatename {
public updatename()
{
list<account> accs=[select name form account where name='GenePoint'];
list<account> lstacc = new list<account>();
for(account a:accs)
{
a.name='Jaffa point';
lstacc.add(a);
}
update lstacc;
}
}
Dear amith, nbk, the code is right but, i put 'form' at this place we have put 'from'. Thankyou for help..