+ Start a Discussion
Max PaqMax Paq 

Validation rule and data load.

Hello everyone,

We are running into a weird problem in our Salesforce org. We have some code that run on a child object and update the parent object and everything seemed to be working just fine. However, today, when trying to insert records via dataloader.io our insert failed because of a validation rule being triggered on the parent object. But here is the fun part, the validation rule should not have been triggered! I checked it and everything was fine, I deactivated it and then another validation rule was triggered on the parent object (also should not have triggered). And when manually inserting a child record everything worked just fine.

Am I missing something in regard to validation rules and triggers?

Thank you for your help.
HawkedHawked
The clue to the puzzle lies in the validation rule, update your question with the validation rules that are firing, I feel that there should be criteria in the validation rule that bypasses based on the profile of the user. If you are doing any DML on the parent record from the child the validations will fire if you want it or not.  
Max PaqMax Paq

Thanks for the quick reply:

The two validation rules that fire are this one:

Making sure we are allowed to track this data point (credit)

(!INCLUDES( Period__r.Building__r.LEED_Credit_Checklist__c,"MRc7") && (ISPICKVAL(LEED_Credit__c,"MRc7") 
&& !ISPICKVAL( Data_Provided__c ,"NONE"))) 

And this one:

To make sure people enter a start date that is before the end date

if(and(isblank(End_Date__c), isblank(Start_Date__c)),False, 

End_Date__c < Start_Date__c)

What weirds me out a little more is let say record A is the child of record B, I insert record A via a loader but it returns an error because of Record C triggered a validation rule. Shouldn't I get an error for record C but Record A & B should be totally fine?