You need to sign in to do that
Don't have an account?
Trailhead validation Closed date error
On the using basic in checking Formula challege. I have done the challege and tested the results but I cant get it to validate that its correct. I have re written the formula Multiple times now and everytime when I test it the validation fires as expected. But I can get it to validate through trailhead. I get the following error.
"Challenge Not yet complete... here's what's wrong:
The validation rule does not reference the 'IsClosed' and 'CloseDate' fields correctly. Take a look at the requirements again."
Here is the challenge:
Your number-crushing sales team has so many deals in the pipeline, you’re starting to see occasional problems with data quality. Namely, sales reps are forgetting to update the close date to a date in the future. Make a formula that requires an opportunity to have a CloseDate of today or any future date. Hint: this formula should reference the hidden IsClosed checkbox field on the Opportunity object, and you will be creating the formula as an Opportunity validation rule.The validation rule should be on the Opportunity object
The validation rule should be named 'Close_Date_Alert'
The validation rule should fire if IsClosed is not selected and CloseDate is yesterday or earlier
The validation rule should display the error 'Hey McFly, unless you are planning to go back in time, please update your close date' at the top of the page when triggered
Here is the formula I currently have in there:
CloseDate < TODAY() && NOT(IsClosed)
I have probably written this like 10 diffrent ways and cant get it to properly validate.
"Challenge Not yet complete... here's what's wrong:
The validation rule does not reference the 'IsClosed' and 'CloseDate' fields correctly. Take a look at the requirements again."
Here is the challenge:
Your number-crushing sales team has so many deals in the pipeline, you’re starting to see occasional problems with data quality. Namely, sales reps are forgetting to update the close date to a date in the future. Make a formula that requires an opportunity to have a CloseDate of today or any future date. Hint: this formula should reference the hidden IsClosed checkbox field on the Opportunity object, and you will be creating the formula as an Opportunity validation rule.The validation rule should be on the Opportunity object
The validation rule should be named 'Close_Date_Alert'
The validation rule should fire if IsClosed is not selected and CloseDate is yesterday or earlier
The validation rule should display the error 'Hey McFly, unless you are planning to go back in time, please update your close date' at the top of the page when triggered
Here is the formula I currently have in there:
CloseDate < TODAY() && NOT(IsClosed)
I have probably written this like 10 diffrent ways and cant get it to properly validate.
All Answers
Try this one : AND(CloseDate < TODAY(), NOT(IsClosed))
I can make this challenge work, but I am unable to finde this field on the object.
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_opportunity.htm
IsClosedType
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Directly controlled by StageName. You can query and filter on this field, but you can’t directly set it in a create, upsert, or update request. It can only be set via StageName. Label is Closed.
There was an unhandled exception. Please reference ID: VOCEZBQM. Error: Faraday::ClientError. Message: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 78580668-118275 (-1792630010)
Condition i used: AND(CloseDate < TODAY(), NOT(IsClosed))
IF(
IsClosed,
CloseDate < TODAY(),
TRUE
)
If the Opportunity has been CLOSED
and the Closing Date is before TODAY (any previous date before today),
than the the statement becomes TRUE
and this will trigger the validation rule to fire,
and it won't allow to save the file.
AND(
NOT (IsClosed)
&& CloseDate < TODAY()
)
Make sure you are using validation rule and not Formula field
Please use the simple for formula to meet the given criteria
The validation rule should fire if IsClosed is not selected and CloseDate is yesterday or earlier
AND(CloseDate < TODAY(), NOT(IsClosed))
AND(CloseDate < TODAY(), NOT(IsClosed))
AND ( IsClosed <> TRUE , CloseDate < TODAY() )
try this one...it will definitely work.....