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
Gaurav Jain 67Gaurav Jain 67 

Can a developer change the API name of a field that is referenced in an Apex Test Class, from schema builder ? \

can a developer change the API name of a field that is referenced in an Apex Test Class, from schema builder ?  Will The API name be changed, and a warning issued to update the class or The API name will not change ?
Sampath SuranjiSampath Suranji
Hi,
You cannot change the API name by using schema builder while it is refering somewhere in a trigger/class. Firstly you have to remove the reference  and change the API name then.

Regards
Sampath
Gaurav Jain 67Gaurav Jain 67
Thanks for the Reply Sampath.. but is it true even if the class is a Test Class ?
Sampath SuranjiSampath Suranji
Hi gaurav,

Yes, we cannot change the API name while reffering in test class also.
Asmita Khare 1Asmita Khare 1
Hello Gaurav,
yes, we cannot chage the API name while reffering in test class
https://help.salesforce.com/articleView?id=000314907&type=1&mode=1. Here is the link.