Consider this simple code:

<apex:page standardController="Lead">
            <apex:pageMessages />
                <apex:inputField label="Assign To" value="{!Lead.OwnerId}" />
                <apex:commandButton value="Submit" />

Click the button without selecting a user/queue/etc, and you'll get the following errors:

Assign To: You must enter a value

Lead Owner: You must enter a value

The expected behavior would be to show the label for the field as an error, not report two errors for the same field. Is this expected behavior, or is it documented anywhere?

  • 1
    Fox there was an Ant who previously has asked the same :) salesforce.stackexchange.com/questions/40146/…
    – Rao
    Jun 18, 2015 at 17:58
  • @rao Thanks. I guess I used the wrong search terms. I wasn't even using a controller, simply built-in validation. I'm using this as a faux lookup system, so I can't change the labels directly (Lead Owner really must stay as Lead Owner). This means I'll have to resort to building a custom object and apply those labels on the custom object. It's not a bad thing, because I needed the object anyways, I was simply looking for an answer. Too bad salesforce.com probably won't fix this... it feels like a bug to me.
    – sfdcfox
    Jun 18, 2015 at 18:08


You must log in to answer this question.

Browse other questions tagged .