I need to update records in DemandTools but I DO NOT want to trigger the data validation rules as some of my old data does not meet the validation requirement so the updates will end up failing. Is there a way to turn off the rules when using DemandTools?
No. Unfortunately there is no way to turn validation rules off via the API, and hence DemandTools or PeopleImport.
- The rule(s) can be deactivated in the Salesforce user interface prior to processing records in DemandTools and then reactivated once processing is complete.
- It is possible to write your validation rules to include an explicit dependency on the user's profile or name to prevent the validation from occurring. Usually, you can do that by wrapping this small piece of code around your validation rule:
- And($Profile.Name != 'System Administrator', rest of validation rule here)
This way, system administrators (or another named profile) won't get caught up in the rules and will be able to proceed normally.
NOTE: By default, validation rules will be ignored when converting a Lead. There is a Salesforce option in Lead Settings to "Enforce Validation and Triggers from Lead Convert" that is unchecked by default but can be checked if these should be active for conversions. This is a Salesforce setting but will be enforced when using either the Lead to Contact, Lead to Account or MassLeadConvert in DemandTools as all 3 of these modules use Salesforce's conversion API call.