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
Paula VoglerPaula Vogler 

Validation rule not firing at all times

Since I have gotten great assistance previously, thought I'd request more assistance with yet another validation rule. I get no syntax errors and the validtion rules fires but only when all fields referenced are null.
Here is what the business wants:
If there is nothing in the DB Manufacturer field, and the sub type is EBR/EFR Needs Office Review then
• EITHER Boiler Type OR Furnace Type needs to be input
• Both of the following fields need to be supplied:
MFG Year
Fuel Type

This is what I have created:
DB_Manufacturer__c  = ""  && ISPICKVAL(Sub_Type__c, 'EBR/EFR Needs Office Review') && ISPICKVAL(Boiler_Type__c, '') && ISPICKVAL(Furnace_Type__c, '') && (ISBLANK(MFG_Year__c) || ISPICKVAL(Fuel_Type__c, '') || ISBLANK( Manufacturer__c ))

Once I select a Boiler Type and no other fields, the validation rules no longer fires. There has to be something with my grouping or AND's and Or's.
Any assistance is appreciated.
Best Answer chosen by Paula Vogler
SrikanthKuruvaSrikanthKuruva
Try the following and let me know how it goes...

DB_Manufacturer__c  = ""  && ISPICKVAL(Sub_Type__c, 'EBR/EFR Needs Office Review') && (ISPICKVAL(Boiler_Type__c, '') || ISPICKVAL(Furnace_Type__c, '')) && (ISBLANK(MFG_Year__c) || ISPICKVAL(Fuel_Type__c, '') || ISBLANK( Manufacturer__c ))

All Answers

SrikanthKuruvaSrikanthKuruva
Try the following and let me know how it goes...

DB_Manufacturer__c  = ""  && ISPICKVAL(Sub_Type__c, 'EBR/EFR Needs Office Review') && (ISPICKVAL(Boiler_Type__c, '') || ISPICKVAL(Furnace_Type__c, '')) && (ISBLANK(MFG_Year__c) || ISPICKVAL(Fuel_Type__c, '') || ISBLANK( Manufacturer__c ))
This was selected as the best answer
Paula VoglerPaula Vogler
That did it, I tested all scenarios and fires everytime it's supposed and does NOT when it shouldn't! I knew it had to do with where my AND & OR's were but after playing around with it so much I got myself all turned around and confused and had to step away! Thanks soo much!