can I get some advise on below validation rule on Account? I have tried to change it multiple times, but it's not firing when it should.
When the User is trying to make an Account Active by unchecking inactive field, each different fields are required for each record to be checked if BLANK.
I'd also like to check if below is correct - val rule should fire when the value is either O or greater than 1 Count_of_Terms__c >=1
With record type IDs - should I remove last 3 digits?
My Validation Rule:
AND(
NOT($Setup.Bypass_Settings__c.Validations__c),
ISCHANGED(Inactive__c)
/*RT 1*/
AND(
RecordTypeId = "0123X0000004FkY",
OR(
ISBLANK(Business_Name__c),
ISBLANK(c2g__CODAAccountTradingCurrency__c),
ISBLANK(c2g__CODAAccountsPayableControl__r.Name),
ISBLANK(c2g__CODAAccountsReceivableControl__r.Name),
ISBLANK(c2g__CODABankAccountName__c),
ISBLANK(BillingStreet),
ISBLANK(BillingPostalCode),
ISBLANK(c2g__CODAInvoiceEmail__c),
ISBLANK(TEXT(c2g__CODAPaymentMethod__c),
ISBLANK(TEXT(c2g__CODAVATStatus__c),
Count_of_Terms__c = 0
)
),
/*RT 2*/
AND(
RecordTypeId = "0123X000000446Q",
OR(
ISBLANK(Business_Name__c),
ISBLANK(c2g__CODAAccountTradingCurrency__c),
ISBLANK( c2g__CODAAccountsReceivableControl__r.Name),
ISBLANK(c2g__CODABankAccountName__c),
ISBLANK(BillingStreet),
ISBLANK(BillingPostalCode),
ISBLANK(c2g__CODAInvoiceEmail__c),
ISBLANK(TEXT(c2g__CODAVATStatus__c)
)
),
/*RT 3*/
AND(
RecordTypeId = "0123X000000446R",
OR(
ISBLANK(Business_Name__c),
ISBLANK(c2g__CODAAccountTradingCurrency__c),
ISBLANK(c2g__CODAAccountsPayableControl__r.Name),
ISBLANK(c2g__CODABankAccountName__c),
ISBLANK(BillingStreet),
ISBLANK(BillingPostalCode),
ISBLANK(c2g__CODAInvoiceEmail__c),
ISBLANK(TEXT(c2g__CODAPaymentMethod__c),
ISBLANK(TEXT(c2g__CODAVATStatus__c),
Count_of_Terms__c = 0
)
),
/*RT 4*/
AND(
RecordTypeId = "0123X000000446S",
OR(
ISBLANK(Business_Name__c),
ISBLANK(c2g__CODAAccountTradingCurrency__c),
ISBLANK(c2g__CODAAccountsPayableControl__r.Name),
ISBLANK( c2g__CODAAccountsReceivableControl__r.Name),
ISBLANK(BillingStreet),
ISBLANK(BillingPostalCode),
ISBLANK(c2g__CODAInvoiceEmail__c),
ISBLANK(TEXT(c2g__CODAVATStatus__c)
)
),
/*RT 5*/
AND(
RecordTypeId = "0123X0000004FkY",
OR(
ISBLANK(Business_Name__c),
ISBLANK(c2g__CODAAccountTradingCurrency__c),
ISBLANK(c2g__CODAAccountsPayableControl__r.Name),
ISBLANK(c2g__CODABankAccountName__c),
ISBLANK(BillingStreet),
ISBLANK(BillingPostalCode),
ISBLANK(c2g__CODAInvoiceEmail__c),
ISBLANK(TEXT(c2g__CODAPaymentMethod__c),
ISBLANK(TEXT(c2g__CODAVATStatus__c),
Count_of_Terms__c = 0
)
)
)