+ Start a Discussion
Todd B.Todd B. 

Validation Rule Not Firing off when a record is created.

I created a validation rule on for the Task Object. 
 
And( 
IsBlank(Text(Activity_Type_01__c )), 
RecordType.Name = "MCC Event", 
CONTAINS(Upper(Subject), "EMAIL") = False
)
The purpose is to ensure the Activity_Type_01__c field is populated every time a task is created other than if the Task Subject contains "Email", pretty striaght forward.  The problem is, it only works when the Task is editted, it does not fire when the Task is initially created.  

Any Thoughts?

Thanks, 

Todd B.

 
AMIT KAMBOJAMIT KAMBOJ
Hi Todd,

Please use below.  Mark this as solution is this resolved the issue.
And( 
IsBlank(Text(Activity_Type_01__c )), 
$RecordType.Name = "MCC Event", 
NOT(CONTAINS(Upper(Subject), "EMAIL"))
)

Thanks
Amit
AMIT KAMBOJAMIT KAMBOJ
Try this also.
And( IsBlank(Text(Activity_Type_01__c )), RecordType.Name = "MCC Event", NOT(CONTAINS(Upper(Subject), "EMAIL")) )
Todd B.Todd B.
Thank you for you respone Amit, unfortnately all those are doing is rewriting my exisiting logic, but the problem still remains.  I can still Create a task without the Activity_Type_01__c being populated.  Only when I edit the exisiting task does the validation rule realize there is no value in the Activity_Type_01__c field.