+ Start a Discussion
Tammer SalemTammer Salem 

https://trailhead.salesforce.com/projects/suggestion_box/steps/suggestion_box_4

For some reason when verifying this step I keep getting the following error:

Challenge Not yet complete... here's what's wrong: 
The 'Number of Days Open' formula field did not return the correct number of days. Please recheck the formula.

Using the following formula to calculate the number of days the suggestion record is open:
IF(ISBLANK(Implemented_Date__c), TODAY() - DATEVALUE(CreatedDate), Implemented_Date__c - DATEVALUE(CreatedDate))

Any ideas
Best Answer chosen by Tammer Salem
RakeshRakesh (Salesforce Developers) 
HI Tammer,

Sorry for the issue you are encountering.

Goto Setup>Customize>Case>Fields>Custom fields & Relationship>Create new>Formula field>
Give Label Days Since the Last Update>Choose return type Number and in formula editor add the below formula. Create this formula field on Case object. and check if there might be some trigger or validation rule on Account or Case level first deactivate this and then give a shot
Account.LastActivityDate - today()

Hope this helps you.
Please mark it as solved, If this reply was helpful.

Thanks,
Rakesh

All Answers

RakeshRakesh (Salesforce Developers) 
HI Tammer,

Sorry for the issue you are encountering.

Goto Setup>Customize>Case>Fields>Custom fields & Relationship>Create new>Formula field>
Give Label Days Since the Last Update>Choose return type Number and in formula editor add the below formula. Create this formula field on Case object. and check if there might be some trigger or validation rule on Account or Case level first deactivate this and then give a shot
Account.LastActivityDate - today()

Hope this helps you.
Please mark it as solved, If this reply was helpful.

Thanks,
Rakesh
This was selected as the best answer
Narender Singh(Nads)Narender Singh(Nads)
Hi Tammer,
I guess most likely you have created the Implemented_Date__c to be a Date Time field when it should be a Date field instead.

May I suggest you check the data type of that field (Implemented_Date__c )
and you should be good to go.

Let me know if it works.
Thanks
Tammer SalemTammer Salem
Thank you Rakesh - this apparantly worked (although it doesn't really make sense from a business logic point of view).