You need to sign in to do that
Don't have an account?
twrig15
Validation Rule to avoid record creation if a record formula field will be exceeded
Hello,
I have a validation rule that I need to pretend a record from being save on creation on the Training Object if the record will exceed the number of Hours Purchased (Formula Field on a related Account Object).
My current formula looks like this but it is only working when I edit the record.
AND(Account__r.Total_of_Hours_Used__c > Account__r.Total_Of_Hours_Purchased__c, ISPICKVAL( Account__r.Training_Billing_Type__c, "Prepaid"),
AND( ISNEW()
)
)
I have a validation rule that I need to pretend a record from being save on creation on the Training Object if the record will exceed the number of Hours Purchased (Formula Field on a related Account Object).
My current formula looks like this but it is only working when I edit the record.
AND(Account__r.Total_of_Hours_Used__c > Account__r.Total_Of_Hours_Purchased__c, ISPICKVAL( Account__r.Training_Billing_Type__c, "Prepaid"),
AND( ISNEW()
)
)
All Answers
Your validation rule looks fine to me. Just make sure
1. You are checking by populating correct account which satisfies the condition to valdiate
Total_of_Hours_Used__c > Total_Of_Hours_Purchased__c and Training_Billing_Type__c = "Prepaid"
2. There is no other process which changes values in abckground and validation is skipped.
Thanks
Shashikant