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
GoForceGoGoForceGo 

Sequencing Validation Rules



I am loading an excel spreadsheet through API into an object in salesforce. I have validation rules on this object.
When I get back errors on creation of this object, the validation rules seem to be in alphabetical order of field names.

Is there a way of controlling the validation rules sequence so that I can get back the first field in the spreadsheet as the first error?

Sonam_SFDCSonam_SFDC
Don't think this is something that can be controlled as it is out of box validation that you are using.

However, if you write before update, before insert triggers on these objects and replicate the validations - youcan then control which validation to trigger when.