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
bhatt bijalbhatt bijal 

Challenge Not yet complete... here's what's wrong: The 'Last_Day_of_Month__c' does not exist

IF( MONTH( NOW() ) = 12,
  DATE( YEAR( NOW() ), 12, 31 ),
  DATE( YEAR( NOW() ), MONTH( NOW() ) + 1, 1) - 1

Create a new formula with the same label, name, and data type that successfully compiles.
The formula should be of Date type and on the Case object
The formula should have the name Last Day of Month and the resulting API name Last_Day_of_Month__c
The formula should return the last day of the current month
Check Challenge


Can any one help me to solve this???
 
Best Answer chosen by bhatt bijal
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for same issue
1) https://developer.salesforce.com/forums/?id=906F0000000MLkXIAW

Can you please check below point
1) Please share the screen shot of your formula field
2) I hope you create formula field on standard case object ?
3) PLease check Field level access for "Last_Day_of_Month__c" field
4) Please API name as well

Let us know if this will help you

Thanks
Amit Chaudhary

All Answers

Jerome RussJerome Russ
The test cannot find your field. Are you sure the API name on the Case object was created as they required?

You could also try opening the dev console while you verify so you can see the debug Logs and use that to determine the issue.
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for same issue
1) https://developer.salesforce.com/forums/?id=906F0000000MLkXIAW

Can you please check below point
1) Please share the screen shot of your formula field
2) I hope you create formula field on standard case object ?
3) PLease check Field level access for "Last_Day_of_Month__c" field
4) Please API name as well

Let us know if this will help you

Thanks
Amit Chaudhary
This was selected as the best answer
bhatt bijalbhatt bijal
 sloved Thanks For your help.

Thanks Jerome Russ
Thanks Amit 
 
Krishna RaviKrishna Ravi
Hi,

the below formula worked for me:

DATE(
 YEAR(  TODAY() ),
 MONTH(  TODAY() ),
 CASE(
   MONTH(  TODAY() ),
   2, 28,
   4, 30,
   6, 30,
   9, 30,
   11, 30,
   31
 )
)

Thanks,
Krishna.
Miriam McCabeMiriam McCabe
For me it was the field level security. Once I granted access to System Administrator the challenge passed.
mouna hannachimouna hannachi
Krishna Ravi, 

 I have created a field type formula DATE and I have Inserted your formula but doesn't working for me 
I have had this error message User-added image
Permjit HiraniPermjit Hirani
Inorder for me to understand & learn the logic (new to writing codes & IT logic!), I used the formula below. It's not as refined as the earlier two in thread but it passed the trailhead challenge!
DATE( YEAR(TODAY()),MONTH(TODAY()),
IF(
   OR(
     MONTH(TODAY()) = 4,
     MONTH(TODAY()) = 6,
     MONTH(TODAY()) = 9,
     MONTH(TODAY()) = 11
   ),30,
IF(MONTH(TODAY()) = 2,
     28,
     31
   )
 )
)
 
Good luck!
 
 
jianlong mujianlong mu
IF( MONTH( TODAY() ) = 12, 
  DATE( YEAR( TODAY() ), 12, 31 ),
  DATE( YEAR( TODAY() ), MONTH( TODAY() ) + 1, 1) - 1)