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
DokerDoker 

Can you explain me how to call apex from list button AND set field errors?

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'.