Search Community
- Force.com Discussion Boards
- :
- Salesforce User Discussions
- :
- Best Practices Discussion
- :
- Closed - Lost to required field Reason Lost
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Closed - Lost to required field Reason Lost
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-24-2010 12:20 PM
Hey there all. I'm trying to create a validation rule, that says when an Opportunity Stage is set to Closed - Lost, then a required field comes up "Reason Lost". This is what I have as of now, and it is not working ..
AND ( OR ( ISPICKVAL( StageName, "Closed Lost")), ISNULL(Reason_Lost__c ) )
Thanks for all the help.
Solved! Go to Solution.
Re: Closed - Lost to required field Reason Lost
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-24-2010 12:40 PM - last edited on 02-24-2010 12:41 PM
Here's one that I wrote for my SFDC.Org, you don't have to evaluate the Oppotyunity Stage, you can use the IsClosed and IsWon fields, which makes it a lot easier if your SFDC.Org has multiple Sales Processes.
AND (IsClosed ,
NOT(IsWon),
ISPICKVAL( Loss_Reason__c ,""))
my Loss Reason field is a Picklist , but you can use LEN, ISBLANK, or ISNULL if you have a Text Field
AND (IsClosed ,
NOT(IsWon),
LEN(Loss_Reason__c) < 1)
AND (IsClosed , NOT(IsWon),
ISNULL(Loss_Reason__c))
AND(IsClosed,
NOT(IsWon),
ISBLANK(Loss_Reason__c))
Re: Closed - Lost to required field Reason Lost
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-24-2010 01:05 PM
Re: Closed - Lost to required field Reason Lost
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-24-2010 01:28 PM - last edited on 02-24-2010 01:30 PM
Is there a way I can make that field required only if Closed Lost is chosen ?
Or is there a way to make that field only visible if Closed Lost is chosen ?
I'm using Professional Edition, just in case you needed to know that.
EDIT --- nvm I got it working with your first code example.
Thanks again sir.
Re: Closed - Lost to required field Reason Lost
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-24-2010 01:35 PM
I'm not sure what you mean, do you mean using only StageName instead of IsClosed/IsWon?
I guess then you'd do something like
AND(ISPICKVAL(StageName, "Closed Lost"),ISNULL( Reason_Lost__c ))
Re: Closed - Lost to required field Reason Lost
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-24-2010 01:38 PM
To answer your last question, I basically was just wondering if there was a way for my "Reason Lost" field to be hidden unless "Closed - Lost" was selected from a picklist.
But needless to say I was able to get it working using the LEN example you gave.

