I have text area field which is limited to 255 char only but the new requirement asks that this field's limit be increased. So I commented out all apex that references to this field, tried changing the field to Text Area(Long) and reverted the apex back. We haven't moved this another environment(since we have schedules on when to move it) and my concern is that will this cause an error when we deploy it? If yes, what are the steps I can take to avoid this error? Thanks!

  • forgot to mention that the apex and field are already existing in other environment. there will be changes only when we deploy it.
    – george
    Commented Jun 10, 2016 at 15:07
  • A couple of us have already added the only thing you have to worry about. Do you still have any questions?
    – Adrian Larson
    Commented Jun 14, 2016 at 15:30
  • just deployed it right now to another environment. there were no error. i was worrying since i receive an error when changing the field before commenting out the line that references it.
    – george
    Commented Jun 15, 2016 at 13:28

3 Answers 3


The only errors you would have to worry about are if you filter on that field. Text Area (Long) cannot be in a WHERE clause, unlike Text Area.

SELECT Id FROM MyObject__c WHERE TextArea__c = 'abc'     // works
SELECT Id FROM MyObject__c WHERE TextAreaLong__c = 'abc' // ERROR
  • fortunately i dont have that since i am only changing the value of the field.
    – george
    Commented Jun 10, 2016 at 15:53

This field should not cause any errors on deployment as there is no data loss in changing from Text Area to Text Area(Long). So good news for you:)


it was not necessary comment all code, in your case you could legitimately convert field from Text lo TextArea(long).

What you should aware that TextArea(long) is more restricted for SOQL usage. You can not use it in WHERE clause for example.

If all the code works in sandbox than there wont be any problem with deploy.

  • i only commented out the line that references this field. i commented it out since i am receiving an error that the field is reference by an apex when changing the data type to text field(long)
    – george
    Commented Jun 10, 2016 at 15:49
  • for the soql. fortunately, i dont have that. i only have codes that changes the value of this field.
    – george
    Commented Jun 10, 2016 at 15:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .