0

I have a problem with a validation rule not being triggered.

Object A trigger updates Object B Object B has a validation rule. Will the validation rule fire?

1

Yes whenever there is an insert/update on any object from trigger the validation rule will fire You can read more on order of execution in the official documentation here

| improve this answer | |
0

Whenever you create or update the record on object B, its validation rule will fire. It dosnt matter from where this creation or update is happening.

You can just think from object B's perspective, why it would let anyone create or update a record on it unless the data on that record is correct. If it happens then it is going to corrupt your database so, it dosnt matter from where the event is firing; it can be from data load , workbench, annonymous window or test class dosnt matter to it.

I hope I was able tk answer your question.

| improve this answer | |
0

system and Custom validation Rule fires before (after trigger) context Execution, so I think if your trigger is written in after context then Custom validation and system validation will Not fire because of order of Execution

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.