+ Start a Discussion
fred flores 20fred flores 20 

trail head formula fields return incorrect result

after completing the challenge when checking the results the system indicates error. But the value is correct.
https://trailhead.salesforce.com/trails/force_com_dev_beginner/modules/point_click_business_logic/units/formula_fields

The formula evaluates "0" , I tested it twice. With a prior result of -3 (last activity) was 5/1 , today was 5/3 the formula evaluated -3.
Today I retested again. Updated the Activity today , the formula evaluated = 0. The error on screen shows 

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 look forward to your update.
Best Answer chosen by fred flores 20
Amit Singh 1Amit Singh 1
Use below formula.

TODAY() - Account.LastActivityDate

Let me know the outcomes.
Thanks,
AMit Singh

All Answers

Amit Singh 1Amit Singh 1
Use below formula.

TODAY() - Account.LastActivityDate

Let me know the outcomes.
Thanks,
AMit Singh
This was selected as the best answer
fred flores 20fred flores 20
I see my error. I wrote the formula in reverse of the information you indicated. Object - TODAY().

Thanks for your feedback. I will retest and recheck. That was the fix. Appreciate your help.

Fred Flores
Pooja Gupta 54Pooja Gupta 54

Hi,

Can anybody tell me how to solve this error-

I am getting the below error while checking the result for https://trailhead.salesforce.com/trails/force_com_dev_beginner/modules/point_click_business_logic/units/formula_fields :

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Delete failed. First exception on row 0 with id 0016F000020o7gkQAA; first error: DELETE_FAILED, Your attempt to delete Test Account could not be completed because it is associated with the following cases.: 00001043 : []