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
DeBoLoDeBoLo 

when validation rules will be applied?

Hi,

 

Validation rules will be applied before data saved to SF DB. This is true when data operations will be done through SF UI. My question is,  Will validation rules be applied when client app importing the data?

 

Thanks,

forcedotcomforcedotcom

Hi - yes validation rules apply to data loads via the API. This may help you:

 

The following is the order salesforce logic is applied to a record.

  1. Old record loaded from database (or initialized for new inserts)
  2. New record values overwrite old values
  3. System Validation Rules
  4. All Apex “before” triggers (EE / UE only) 
  5. Custom Validation Rules
  6. Record saved to database (but not committed)
  7. Record reloaded from database
  8. All Apex “after” triggers (EE / UE only)
  9. Assignment rules
  10. Auto-response rules
  11. Workflow rules
  12. Escalation rules
  13. Parent Rollup Summary Formula value updated (if present)
  14. Database commit
  15. Post-commit logic (sending email)
AtulRAtulR

Will validation rules be applied when client app importing the data?
 
 => Yes, validation rule are applied whenever data is saved to database.
 
That can be
1) save from UI
2) save from Apex
3) Save from Web services (e.g. data loader)

DeBoLoDeBoLo

Thank you guys for your valuable input.