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
TScottTScott 

Validation Errors While Saving Record(s)

We're developing a Visual Force application with Custom Apex Controllers. One of the fields that we are using is a text field and we are getting the following error when trying to change the field type to a picklist:

Validation Errors While Saving Record(s)
There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Generic Exception Creator".
Click here to return to the previous page.

Note that we have no data records for the object in question. We also have no validation rules. I suspect that this is an erroneous message that isn't leading us to the true cause of the problem. Interestingly, a Google search shows a discussion on this topic (http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fforums.sforce.com%2Fsforce%2Fboard%2Fmessage%3Fboard.id%3DVisualforce%26thread.id%3D2050&ei=uoRaSIWiE52qiAH88syHDA&usg=AFQjCNHDdOqhsIvyrwF6oUGxpAx77BjoEA&sig2=LZx9A1b-WT1FxUczjVDZFQ), but that thread appears to have been deleted for some reason. We're going to remove the field and add it again, but I am concerned that we found a bug that could affect us again. Any ideas what is causing this error?

Thanks.
-Tom Scott
Appirio
Best Answer chosen by Admin (Salesforce Developers) 
BenLBenL
I've run into that error as well.

Try deleting the field instead.  It won't actually let you delete and should provide a more specific error message leading you to whatever is referencing the field and preventing the change.  In my case the delete method listed some apex classes that were referencing the field.  From there I was easily able to resolve and then change the field type.

Good Luck!


All Answers

TehNrdTehNrd
When you say your are trying to change the field type to picklist do you mean your are doing this in through the setup UI and clicking the "Change Field Type" button?

If so, perhaps there are issues with changing the field types of fields that are used in Pages but they (SFDC) don't have a polished message for this error. If this field is used in a page what happens if you remove it from all pages and then try to change the type.


Message Edited by TehNrd on 06-19-2008 09:27 AM
TScottTScott
Yes, we're trying to change the field type through the UI. We did comment the field that is bound on the VF page, but that didn't change anything. Perhaps it was bound elsewhere that we missed. In any case, I agree that it's likely an error that just isn't being handled correctly.
BenLBenL
I've run into that error as well.

Try deleting the field instead.  It won't actually let you delete and should provide a more specific error message leading you to whatever is referencing the field and preventing the change.  In my case the delete method listed some apex classes that were referencing the field.  From there I was easily able to resolve and then change the field type.

Good Luck!


This was selected as the best answer
suresh.csksuresh.csk

Hi.

 

I also experienced the same error while converting a text field to picklist.

 

First I got errors in Formulas and Approval process.Then I  removed the

formulas reference and the approval references .

 

Now  proceeded the process to convert the text to picklist and got the above error.

I used this field in my Apex classes also.So I removed this field from Apex class .

 

After that I tired to change the data type from text to picklist  and I was success .

 

 

cheers

suresh

 

 

 

 

Arpita Ghosh 8Arpita Ghosh 8
When you are trying to change the field type text to picklist uncheck this "Restrict picklist to the values defined in the value set" (yellow marked) checkbox. Then try to save it.

User-added image