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 

can any one of u plz clear this error..................

error on variable Name plz check it
Best Answer chosen by bhanu challenge
Amit Chaudhary 8Amit Chaudhary 8
Can you please in your org you have any Apex class with Account Name ? if yes then please rename or delete that class
 

All Answers

Dhanya NDhanya N
Hi bhanu,

It seems like that error is from different file.
Because you have given trigger name as updateexample. And in Problems section it is showing error for 'beforeupdateex'. Check once if that trigger or controller exists.

Thanks,
Dhanya
Tavva Sai KrishnaTavva Sai Krishna
Hi bhanu,

You need to use the trigger.oldMap  to get the old values of the record. copy the first for loop with the below code.
for(account a: trigger.new){
      
      system.debug('Trigger.old : Account Name '+ trigger.oldMap.get(a.Id).Name);
      system.debug('Trigger.old : Account Industry '+ trigger.oldMap.get(a.Id).Industry);
}

Let me know if you face any isssues. Also mark this answer as best answer if this answers to your question.

Thanks and Regards,
Sai Krishna Tavva.
bhanu challengebhanu challenge
plz wait am not getting...............
Amit Chaudhary 8Amit Chaudhary 8
Can you please in your org you have any Apex class with Account Name ? if yes then please rename or delete that class
 
This was selected as the best answer