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
DarrellDarrell 

Can you disable native validation rules when updating a record via the API?

Hi,
 
I am trying to determine if it is possible to not trigger field validation rules when making API calls - e.g. a phone number validation field is validating existing bad data when trying to do a UI update - can you ignore that when making an API update?
 
Thanks,
Darrell
werewolfwerewolf
Unfortunately not, validation rules apply to all incoming data right now.  One option would be to create a custom field which is not visible via the API and change it (or set it) when you're making your API calls, and set your validation rules to trigger only when that field is not set or changed.
Jeff TalbotJeff Talbot
Not sure if this will help, but I have found that when I make updates with Excel Connector, validation rules are bypassed. (Note, however, that workflow rules do fire).