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
Rajiv KocherlaRajiv Kocherla 

Q) Hi i am writing a basic trigger to insert a record? The trigger throws me a validation rule error? Is disabling the validation rule the only option to execute a trigger??

Abdul KhatriAbdul Khatri
It looks like the trigger you wrote not following the rules you create Validation Rule for so make sure the trigger code must not voilate. I guess therefore you created that Validation Rule to avoid and data integrity issue. For me it's a good news, why you wanted to ignore validation rule just to make your trigger work instead you fix the trigger to work with that rule.