+ Start a Discussion
Nara2012Nara2012 

validation not firing

I've this validation rule, which is supposed to fire if Resolution or Closed Reason is blank. But it is not firing when closed reason is entered and resolution is blank.All other criteria met and when the resolution is blank the validation rule is not firing even thougth there is an AND. Resolution is a pick list field and closed reason is a long text area field.Could someone let me know why is this happening?

AND 

OR 

$User.ProfileId = "00e80000001Sdk2", 
$User.ProfileId = "00e80000001SpCX" 
), 
ISBLANK(TEXT(Resolution__c)), 
ISBLANK(Closed_Reason__c), 
ISPICKVAL(Status, "Resolved"), 
ISBLANK(Owner:Queue.QueueName) 
)

 
R Z KhanR Z Khan
Your validaiton i set to fire when BOTH resolution and reason are empty. Change it to the following

AND 

OR 

$User.ProfileId = "00e80000001Sdk2", 
$User.ProfileId = "00e80000001SpCX" 
), 
OR(
ISBLANK(TEXT(Resolution__c)), 
ISBLANK(Closed_Reason__c), 
),
ISPICKVAL(Status, "Resolved"), 
ISBLANK(Owner:Queue.QueueName) 
)
Deepak GulianDeepak Gulian
Formula is good by @ R Z Khan
ISBLANK(Closed_Reason__c),  Replace Comma at the end
Pruthvi KankunthalaPruthvi Kankunthala
@Nara2012 : Try this 
AND 
( 
	OR 
	( 
		$User.ProfileId = "00e80000001Sdk2", 
		$User.ProfileId = "00e80000001SpCX" 
	), 
	OR
	(
		ISBLANK(TEXT(Resolution__c)), 
		ISBLANK(Closed_Reason__c)
	)
	ISPICKVAL(Status, "Resolved"), 
	ISBLANK(Owner:Queue.QueueName) 
)
Amit Chaudhary 8Amit Chaudhary 8
Please never add the hardcorded ID in the code
AND 
( 
	OR 
	( 
	$Profile.Name = "Add profile 1 Name", 
	$Profile.Name = "Add profile 2 Name" 
	), 
	
	OR(
	ISBLANK(TEXT(Resolution__c)), 
	ISBLANK(Closed_Reason__c)
	),
	ISPICKVAL(Status, "Resolved"), 
	ISBLANK(Owner:Queue.QueueName) 
)
Let us know if this will help you