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
Liz DwanLiz Dwan 

Help with Validation rule

Need the rule to require the text and value when stage is 'Qualified out'. Rule is only applying to Reason and not notes.
AND( 
(TEXT(StageName) = "Qualified Out"), 
(ISBLANK(TEXT(Qualified_Out_Reason__c))), 
ISBLANK( VALUE(Qualified_Out_Notes__c ) 
))

Any help apreciated. Thanks
erksfdcDeverksfdcDev
AND

(TEXT(StageName) = "Qualified Out"), 
(ISBLANK(TEXT(Qualified_Out_Reason__c))), 
ISBLANK(Qualified_Out_Notes__c) 
)

or Use 'ISNULL'

Please go through this for more info:
http://www.forcewizard.com/blog/isblank-vs-isnull
VineetKumarVineetKumar
What type of values are stored in Qualified_Out_Notes__c ?
Can you try using TEXT instead of VALUE in your rule?

AND( 
(TEXT(StageName) = "Qualified Out"), 
(ISBLANK(TEXT(Qualified_Out_Reason__c))), 
ISBLANK( TEXT(Qualified_Out_Notes__c ) 
))
Liz DwanLiz Dwan
I tryed ISBLANK and ISNULL  but only getting error for Reason.Need both fiedl
Qualified_Out_Notes__c is data type text area
 @VineetKumar Error on formula you provided "Incorrect parameter type for function 'TEXT()'. Expected Number, Date, DateTime, Picklist, received Text"
VineetKumarVineetKumar
AND( 
(TEXT(StageName) = "Qualified Out"), 
(ISBLANK(TEXT(Qualified_Out_Reason__c))), 
ISBLANK(Qualified_Out_Notes__c ) 
)

Ok, since Qualified_Out_Notes__c  is TEXT AREA, use ISBLANK without typecasting it to TEXT.
Liz DwanLiz Dwan
Thanks but I can still save an opportunity without completing Qualified_Out_Notes__c
VineetKumarVineetKumar
Hi Liz,

I tried you VR in my developer Org and found something interesting.
The reason your Text Area is not evaluating is because the field doesn't even show up when you use "insert field" option to insert the field in your evaluation box. What I assume is that you just wrote the field API name in box, which gets saved as it did in my case (I don't know what's the actual reason for this behaviour)
To resolve your problem, I would suggest you to create a workflow to update a flag (checkbox), if any value is inserted in the field.
Surprisingly the text area is available in the workflow rule criteria, and then use this flag in your validation rule.

Let me know if this helps.