+ Start a Discussion
Gaurav Jain 67Gaurav Jain 67 

Facing Issue with Challange in Developer trailhead

Hi I am currently progressing on developer trailhead and i am currently on Formulas and Validations >> Using Formula Fields. I am not able to identify what exactly i am missing here. The steps to be followed are
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.

I have created a custom obj Case and Added a Formula field with the name as mentioned. Formula i have used in Today () - LastActivityDate . But when i check my activity it display error "The 'Days_Since_Last_Update__c' does not exist "..

My first confision in the steps is "The formula should return the number of days between the account’s Last Activity Date and today.". what does ACCOUNT'S Last Activity Date means here .. do i need to somehow relate Case and Accounts object first  ?

Any help/suggestions please ?
 
Best Answer chosen by Gaurav Jain 67
Amit Chaudhary 8Amit Chaudhary 8
Please create one formula field with Number type on case object like below
(Today()- Account.LastActivityDate)

User-added image

Same worked for me. Please share your screen shot if above will nt help u 
Please refer below post for more info
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000BQwUIAW

NOTE:- we need to find out the difference between two date here
Please let us know if this will help u


Thanks
Amit Chaudhary

All Answers

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

User-added image

Same worked for me. Please share your screen shot if above will nt help u 
Please refer below post for more info
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000BQwUIAW

NOTE:- we need to find out the difference between two date here
Please let us know if this will help u


Thanks
Amit Chaudhary
This was selected as the best answer
Gaurav Jain 67Gaurav Jain 67
Thanks for reply Amit.

After visiting the link you provided, i found out my mistake..  i was actually creating Custom objects for Case and Account.
Anyways i have corrected my mistake now .

Thanks a lot for your help.
Gaurav
Hitesh Khatri 3Hitesh Khatri 3
My problem has been solved. Rhanks :)
Patrick CantelmiPatrick Cantelmi
Thank you! This helped me complete the challenge as well!
Mecrin Luvis 1Mecrin Luvis 1
My problem has been solved
 
harishs adminharishs admin
Hi Amit,

I followed same steps, getting error.
Error message
ERROR : 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: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Test Records arenot allowed: []

Please suggest a solution.

Case Object



Thanks!!
Harish.
Amit Chaudhary 8Amit Chaudhary 8
Your fomula look good to me. If possible share your user Name and password with me on my email id (amit.salesfoorce21@gmail.com) . I will check.
JaiminJaimin
Hi Amit,

I'm also follow the same steps but still gatting error.

1)
User-added image
2)
User-added image


Thanks,
Jaimin Khamar
Anshuman Singh TomarAnshuman Singh Tomar
Hi All,

I am also facing the same problem. I used the Formula (Today() - Account.LastActivityDate) but when I click check syntax, an error message "Field AccountName does not exist. Check spelling." is displayed.

Can anyone pls help? I am stuck to complete this challenge.User-added image

Pls help

Anshuman
Efstratios PolychronidisEfstratios Polychronidis
Hello All, I am facing the same error with harishs Admin. I get an error 

"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 001b000003Jz2fSAAR; first error: DELETE_FAILED, Your attempt to delete Test Account could not be completed because it is associated with the following cases.: 00001053 : []"

can someone help me on pinpoint what it might goes wrong?

​Thank you!
Amit Chaudhary 8Amit Chaudhary 8
Please delete "00001053" case and try again or delete test account (001b000003Jz2fSAAR)
 
harishs adminharishs admin
Amit, 
I tried to share my credentials to ur above mentioned email. But its throwing "Mail Delivery Failure". Could you please share valid email id.

Thanks!!
Harish
Amit Chaudhary 8Amit Chaudhary 8
my email id is "amit.salesforce21@gmail.com"
Efstratios PolychronidisEfstratios Polychronidis
Hello Amit,  I dont have that case number either that account id and still the issue remains...is quite strange. any other ideas on what might cause this error?

Thank you in advance!
Amit Chaudhary 8Amit Chaudhary 8
If you can share your user name and password with me then i can have a look into your org. my email id is "amit.salesforce21@gmail.com"
Frederick H LaneFrederick H Lane
This problem is happening on all my challenges. I've just completed the Roll-Up Summary exercise and had the same error message.
Harsha NSHarsha NS
Hi,
Just double check if you have coded the solution in your DEV org bu mistake, instead of doing it in the Trailhead org!