• Jochen Hoscheid
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I tried to fullfill the following challenge:
The following formula, meant to return the last day of the current month, has a couple of errors in it:

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

I created a new formular field named "Last Date of Month" for the case object. My formular is as follows which has no syntax errors:
IF(MONTH(Today()) = 12,
  DATE(YEAR(Today()), 12, 31 ),
  DATE(YEAR(Today()), MONTH(Today()) + 1, 1) - 1
)

However, I got the following error message when I try to approve the challenge:

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, You can only set a case as escalated if it is high priority and not closed: [IsEscalated]

Has anyone a clue what I did wrong?

Many thanks in advance.
I tried to fullfill the following challenge:
The following formula, meant to return the last day of the current month, has a couple of errors in it:

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

I created a new formular field named "Last Date of Month" for the case object. My formular is as follows which has no syntax errors:
IF(MONTH(Today()) = 12,
  DATE(YEAR(Today()), 12, 31 ),
  DATE(YEAR(Today()), MONTH(Today()) + 1, 1) - 1
)

However, I got the following error message when I try to approve the challenge:

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, You can only set a case as escalated if it is high priority and not closed: [IsEscalated]

Has anyone a clue what I did wrong?

Many thanks in advance.