How to disable/enable all validation rules for data loading While working on a recruiting application, I found a solution for being able to load data into a SalesForce application without being blocked by validation rules. Validation rules are usually intended to be applied only when a user creates a record and not when data is being imported from an external database. In this recruiting application, candidate records go several stages in a sequence (1-lead, 2-phone, 3-applicant, 4-interview, 5-contract negotiation, etc.) and this validation rule prevented the import process from loading candidate records in a stage higher than lead. So the solution was to create a Custom Setting of type Hierarchy with a flag/checkbox in it that disables validation rules for a given user or profile. That is, all the validation rules will include this flag and only apply when the value of this flag is enabled. To implement it: 1) click Setup, then on the left side, click App Setup/Dev...
#wowwow
ReplyDelete