You need to sign in to do that
Don't have an account?
Connie Sintso
The formula should return the number of days between the account’s Last Activity Date and today
Trailhead Module 3: Create a formula field that determines the number of days between today and the last activity date for a case's account.
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.
I created the following:
I created a new custom formula field with return type number and called Days Since Last Update.
I created this formula: Account.LastActivityDate - TODAY()
I get this error message:
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
Can you please assist what I did wrong? I'm not sure if my formula is even correct with the challenge. Please help!
Thank you.
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.
I created the following:
I created a new custom formula field with return type number and called Days Since Last Update.
I created this formula: Account.LastActivityDate - TODAY()
I get this error message:
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
Can you please assist what I did wrong? I'm not sure if my formula is even correct with the challenge. Please help!
Thank you.
TODAY() - Account.LastActivityDate
becuase Account.LastActivityDate - TODAY() will return a minus no of days in difference
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
Connie....how'd you get it to work?
(Today()- Account.LastActivityDate)
any ideas?
I got the below error please help me..Thanks
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
You need to use the DATEVALUE function to convert LastActivityDate to a date field. Use custom field and subtract DATEVALUE(LastActivityDate).
Below Code working fine for this Challenge
TODAY() - Account.LastActivityDate as a fomula field Days_Since_Last_Update__c on Case Object.
Thanks & Regards,
Satya P
if(isNull( Account.LastActivityDate ),0,today()-Account.LastActivityDate)
then (TODAY() - Account.LastActivityDate)
(TODAY() - Account.LastActivityDate)
is not working and is returning:
Error: Field Account does not exist. Check spelling.
SOMEONE PLEASE HELP!
Here's what worked for me:
I created a custom field on the Account object and labeled it Last Activity Date - to calculate the value, I set this up as a formula field as a Date type and typed in LastActivityDate in the advanced formula field (this is apparently some type of hidden system field and is not visible as a standard field - go figure), checked Syntax and hit Save. The field is now named Last_Activity_Date__c.
Then I set up the Days Since Last Update custom field on the case object, again using a Formula field and the Advanced Formula editor, return type of Number. Here's the syntax that worked:
TODAY() - Account.Last_Activity_Date__c
You should be able to insert the custom field with the Insert field button (Case>Account>Last Activity Date).
Initially, I tried using the Last Modified Date but that will return an error in the Challenge check (Last Modified Date and Last Activity Date are two separate and distinct fields).
If you have an older developer organization, like me. Try to create a new one. In my case the problem was solved.
I think this is a version bug.
My formula looks like this TODAY() - Account.Last_Activity_Date__c
Thanks & Regards,
Michel Lopes.
This works for me.
I solved the challenge the key is insert the Last Activity field in the account which exists already.
So, TODAY() - Account.LastActivityDate
Also, on the account record make sure you have a related task activity, here I just logged a call activity
Also in your existing account log a activity and you can verify to return the number of days since last activity
(Today()- Account.LastActivityDate)
and only the API name was supposed to have it named as such.
Corrected Version:
Field Label Days Since Last Update
Field Name Days_Since_Last_Update
API Name Days_Since_Last_Update__c
Description formula field that determines the number of days between today and the last activity date for a case's account.
Help Text
Created By Kimberly Vanderboegh, 1/2/2016 6:22 PM Modified By Kimberly Vanderboegh, 1/2/2016 7:34 PM
Formula Options
Data Type Formula [This formula references multiple objects]
Decimal Places 0
TODAY()- Account.LastActivityDate
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: REQUIRED_FIELD_MISSING, Required fields are missing: [test_activity_field__Latitude__s, test_activity_field__Longitude__s]: [test_activity_field__Latitude__s, test_activity_field__Longitude__s]
This is my problem please help me
Phew!
I went in and made sure The field "last name" is no required on either the Accounts or the Cases layout..
I have been doing the same challenge in trail head today.
It is quite likely that this error has to do with an active validation rule you have in your org. In that case the REQUIRED_FIELD_MISSING might be the error message of that rule.
My advice would be that you deactivate any validation you have, so trail head should go straight away to test your case formula
Apart from that, the challenge is expecting a formula with TODAY() and a field named LastActivityDate that you can choose from 'Insert Field' button, so the formula looks like:TODAY() - Account.LastActivityDate, so notice you do not need to create a custom field.
I hope it can help.
Best regards
You miss ")" at the end.
named 'Days Since Last Update'
Advanced Formula : TODAY() - Account.LastActivityDate
you can use Insert Field to insert "Account.LastActivityDate"
So, the correct navigation to create any formula is:
1. From Setup, click Customize | Accounts | Fields.
2. Scroll to the Case Custom Fields & Relationships section and click New.
3. Select Formula and click Next.
TODAY() - Account.LastActivityDate
It will definitely work...... :)
The 'Days_Since_Last_Update__c' does not exist
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
please help
Field NameDays_Since_Last_Update
API NameDays_Since_Last_Update__c
formula- (Account.LastActivityDate - TODAY())
So the steps are the follows:
1.Go to setup
2.Search for case object "Case"
3.Create New "Case Custom Fields & Relationships"
4.Select Formula field
5.Put in the field Label "Days Since Last Update" and select number Type:
6.Than press next and on the right down window called function select Date&Time and then select Today:
7.Now you have to select the operation, go to Insert Operation and in this case select the operation Subtraction.
8.Select the "Insert field" button and select the following:
9.The formula should be like this, check the Syntax and save!
I hope this was helpful.
Thanks
Marco
2. Scroll down to the Case Custom Fields & Relationships section and click New.
3. Select Formula -> Enter Days Since Last Update and select data type as Date -> In formul editor enter TODAY() - Account.LastActivityDate -> save.
4. Check Challenge now.
It seems like the problem is in the API Name doesn´t allow for the "double underscore." When I put in 1 underscore, it doesn´t return the error, but the API in Trailhead says it isn´t there.
The first image is the result of the exam, when I use 1 underscore "Days_Since_Last_Update_c"
The second is the result when I use 2 underscores in the API name. It won´t let me save it, because the custom field can´t have "two consecutive underscore characters." So, now I am stuck. Help.
TODAY() - Account.LastActivityDate
Now on the quick find type Customize > click Customize . On the dropdown list you will see your object named Case. Click the drop down menu on the Cases . Click the Fields . Scroll down to Case Custom Fields & Relationships . Click New > select Formula > on the label box put Days Since Last Update dont fill out the field name. it will populate automatically>select Number > In the text area type TODAY() - Account.LastActivityDate . Click Check syntax . If its green you are green to go. Click Next, Next save . This should work.
TODAY() - DATEVALUE(LastModifiedDate). The command DATEVALUE converts 'the LastModifiedDate' into a number!
but i got this formula work well...
My Formula - Syntax is OK . .
Created a Custom Formula Field within Case and added the formula.
(5*( FLOOR((TODAY()- DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD(TODAY() - DATE( 1900, 1, 8), 7)))-(5*( FLOOR((Date_Opened__c - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( Date_Opened__c - DATE( 1900, 1, 8), 7)))
If so, select the blue dropdown arrow:
And 'Create a Trailhead Playground'
Redue the challenge in the new playground. You probably just needed a fresh playground. Hope this helps!
Today()- Account.LastActivityDate
Hi All,
Despite all the permutation and combinations, the trailhead challenge is still not getting cleared for this one. Looks like a bug over here. Could you please confirm/suggest an alternative in this scenario?
I had finally zeroed in on the formula:
ABS(Account.LastActivityDate) - TODAY())
This would ensure that the negative values are also taken care of, depending on the due dates for the account's closed activities accordingly.
The functionality is working as expected in my synced developer org (with Trailhead) and the 'Days Since Last Update' field is showing the correct values as well.
However, the trailhead challenge is not allowing me to progress and keeps on showing the same message as pasted below in the snapshot. This is when the reports are also showing the correct values.
This is my account report in consideration with the last activity date highlighted in the first instance:
And consequently, the case detail page (for a child record of the concerned test account record) also has the correct value populated in the Days Since Last Update field. Today is September 22nd and the value correctly comes up as 5.
Snapshot below:
Regards,
Sidd
Formula : ABS(Account.LastActivityDate - TODAY())
I am able to clear the challenge. But somehow I am not able to see the result under the field "Date Since Last update in any case".
Kindly help.
Regards
Charu
Did you check if at least one of the activities under the parent account has its status 'Completed' with a set due date?
Also, could you please share the exact formula employed by you in this scenario? The functionality is totally working fine for me but i am still unable to proceed through in trailhead.
Regards,
Siddhartha
I am using the Field Label, "Days Since Last Update" and it auto-populates the Field Name as "Days_Since_Last_Update" instead of the "Days_Since_Last_Update__c" that is in the Hands-on Challenge notes. See attachment.
I am able to create the formula without any syntax errors (ABS(TODAY()-DATEVALUE(LastModifiedDate)).
However, i am still not able to complete the challenge. I am getting the following error.
Please help.
Thanks,
Mil
Today()-Account.LastActivityDate
The above expression will always prints zero unless you have any records under Activiy History related list under that account.
Please mark as solution if you understand this and resolved your issue..
it's work for me
Connie Sintso .
The message is 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, POPULATE ACCOUNT NUMBER PLEASE: [Name]
Any ideas?
Hello Everyone --
My name is Aney and i am new on salesforce.i have been stuck in this tralihead challage "Create a formula field that determines the number of days between the end date of a contract and today." i would try all the above formulas to complet this challange but these formulas not work this particuler challage of "Module Formulas & Validations" then i create a new formula according to this challage * EndDate - TODAY() * its work (Y)
Thanks
Today (2018), the formula for the TrailHead: Formulas & Validations -> Use Formula Fields is:
EndDate - TODAY()
Formula return type Number, decimal places 0.
EndDate - TODAY()
Contract > Contract End Date
Worked for me (2020)
Hi connie
Please check These Stap
Follow below and see if this resolves the issue
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Suraj Tripathi