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
bhanu challengebhanu challenge 

plz check here contact name is what to update...

list<contact> coc=[select id,name from contact where name = ' bhanusfdc nayakudu' ];
for(contact ct : coc){
ct.name = 'bhanu start game';
    }
update coc;
Best Answer chosen by bhanu challenge
Ajay K DubediAjay K Dubedi
Hi Bhanu,
Try this :
List<contact> coc=[select id, Name from contact where name = 'bhanusfdc nayakudu' ];
for(contact ct : coc){
ct.FirstName = 'Bhanu';
ct.LastName = 'start game';
    }
update coc;
In standard Contact Object, you can query with 'Name' but to update you have to use 'FirstName' or 'LastName' or both.
Regards,
Ajay
 

All Answers

Ajay K DubediAjay K Dubedi
Hi Bhanu,
Try this :
List<contact> coc=[select id, Name from contact where name = 'bhanusfdc nayakudu' ];
for(contact ct : coc){
ct.FirstName = 'Bhanu';
ct.LastName = 'start game';
    }
update coc;
In standard Contact Object, you can query with 'Name' but to update you have to use 'FirstName' or 'LastName' or both.
Regards,
Ajay
 
This was selected as the best answer
bhanu challengebhanu challenge
thankq bhayya....