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
Cody ButlerCody Butler 

Trailhead Challenge: Admin Intermediate > Formula's & Validations > Using Formula Fields

Is there a known issue with this Challenge or am I doing something wrong?

The Challenge:
Your support team has asked for improved visibility on account activity level at the time they’re helping with customer issues. Specifically, when they’re looking at a case, they’d like to see an at-a-glance view of the number of days since the case’s related account was last active. Create the formula using these requirements.
  • The formula should be on the Case object.
  • The formula should be of return type Number.
  • The formula should be named 'Days Since Last Update' and have a resulting API Name of 'Days_Since_Last_Update__c'.
  • The formula should return the number of days between the account’s Last Activity Date and today.
Here is what I did:
Setup > Customize > Cases > Fields > Clicked "New" under 'Case Custom Fields & Relationships'
Field Label: Days Since Last Update
Field Name: Days_Since_Last_Update [Why does this field not reflect "Days_Since_Last_Update__c" as is requested in the challenge?]
From the 'Formula Return Type' picklist I selected "Number"
From the 'Decimal Places' picklist I selected "0"
The formula is "Account.LastActivityDate - TODAY ()"
Check Syntax = No errors
Under 'Blank Field Handling' I selected "Treat blank fields as zeroes"

Now when I navigate to a Case Record...the "Days Since Last Update" field is blank.
When I Check the Challenge it says "Challenge Not yet complete... here's what's wrong: 
The 'Days_Since_Last_Update__c' formula field did not return the correct number of days between an Account’s Last Activity Date and today"

I cannot figure out what I am doing wrong.
Any guidance?
Amit Chaudhary 8Amit Chaudhary 8
please check below post. I hope that will help you
1) https://developer.salesforce.com/forums/?id=906F0000000BSUKIA4
2) https://developer.salesforce.com/forums/?id=906F0000000BQwUIAW

Please create one formula field with Number type on case object like below 
(Today()- Account.LastActivityDate)

Please let us know if this will help you

Thanks
Amit Chaudhary
 
Dutta SouravDutta Sourav
Hi Cody,

Your formula returns negative value which is incorrect.

For Example, If Account.LastActivityDate= 5th March, 2016 and TODAY() is 7th March,2016.
It will return (-2).

Just reverse it:
TODAY()- Account.LastActivityDate

Kind Regards,
Sourav.
Ann AllenAnn Allen
There is no data in last activity date. 
Jude NguyenJude Nguyen
Awesome! Thanks for sharing this. Had trouble with this to. 
Charlene JohnsonCharlene Johnson
Hi,

Thank you for sharing your knowledge, so I wanted to ask within the trail that contains this challenge an example is given:  
Example 2: Displaying the Number of Days Until an Opportunity Closes on a Report a similar. Within this example it gives the forumla Close Date - TODAY(). Based on what has been mentioned above wouldnt this example also yeild a negative result?

Charlene