You need to sign in to do that
Don't have an account?
Zachary Singer
Leaving a required field blank causes two error messages to display
Hi everyone,,
We have VF pages with custom field labels that differ from the backend field labels. Trying to save the page with such a required field blank causes two error message to display: one using the custom label and the other the backend label. We have implemented VF pages in the same way in other orgs and do not have this issue. The VF page uses a controller which creates a map between the field API name and the label we want to show. Because some of the custom labels are quite long, relabeling the backend fields is not an option. Any ideas are appreciated. Thanks!
We have VF pages with custom field labels that differ from the backend field labels. Trying to save the page with such a required field blank causes two error message to display: one using the custom label and the other the backend label. We have implemented VF pages in the same way in other orgs and do not have this issue. The VF page uses a controller which creates a map between the field API name and the label we want to show. Because some of the custom labels are quite long, relabeling the backend fields is not an option. Any ideas are appreciated. Thanks!
Cory Cowgill
Can you use SObject.addError(API Field,Message)?
Cory Cowgill
Sorry I believe the correct method is SObject.get('API_FIELD').addError(errorString);