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

Error Force IDE - Cannot update a field from a Formula to something else.

What does this error?


I tried everything to deploy this, but no results.




Check if it is a Cross reference formula field


You can't change a formula's data type to a non-formula data type. Instead, you'll have to create a new field. This limitation is also true when you have a lookup or master-detail relationship field; you can only toggle between those two data types, and not any of the others (e.g. text).

vivek gvivek g
Field datatype cannot change to formula for existing field.
eg: Field ABC type is number we cant chage this field to formula field directly.
Generally we will face this issue, when we depoly using change set this error will appear.
Chetna AgrawalChetna Agrawal
I have created formula field on opportunity just to display an email of Contact__r.solicitor__r.email__c.
while deploying to production showing error cannot update a field to a formula from something else
vivek gvivek g
Hi Chetna,

we will face this issue when we have a sample API field at production with different datatype.
In your sandbox instance you have email field (eg. API will be email__c with formula field) in Production also with same API (email__c with different type if exists we will face this issue).

Vivek Guddeti.