+ Start a Discussion

How can I display errors by a field?

Can you explain me how to call apex from list button that it could set field errors (errors under each invalid line), please?

Currently I check action cheeckboxes and click my custom button.
I execute an apex procedure from ajax. (sforce.apex.execute(...))
This procedure adds errors to some fields ( rec.Status__c.addError ('This field...'))

This is bad because there is an exception thrown that says 'SObject row does not allow errors'.