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
Micky MMicky M 

Deployment

Hi all, does anyone know whats going on here? I have a change set that im validating on production and it fails with the following:

 

API NameTypeLineColumnProblem

Contract_Recurring_Service__c.Billing_Period__cCustom Field Definition313Cannot change field type of a custom field referenced in Apex class or trigger: <a href="/01pD0000000GGve">ContractRecurringService</a>
Recurring_Service_Line_Item__c.Billing_Period__cCustom Field Definition313Cannot change field type of a custom field referenced in Apex class or trigger: <a href="/01pD0000000GGvf">Contract_Recurring_Invoice_Calculations</a>

 

 

Now its correct I am changing the field type from text to picklist, and it is referenced in both those classes in a soql statement both of and are in my change set also. Does anyone have any idea how to solve this as im stumped.

Best Answer chosen by Admin (Salesforce Developers) 
ministe_2003ministe_2003

Check your apex code and triggers for a reference to the field.  You'll need to comment out every reference to the field before you can change it because you cant change the field whilst it's referenced in a class or trigger.  When you've made the change you can then uncomment the field back in.

All Answers

ministe_2003ministe_2003

Check your apex code and triggers for a reference to the field.  You'll need to comment out every reference to the field before you can change it because you cant change the field whilst it's referenced in a class or trigger.  When you've made the change you can then uncomment the field back in.

This was selected as the best answer
Micky MMicky M

Yeah thx, thats what ive just had to do, and what a pain it was :-)