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
Nilima KumariNilima Kumari 

Need Help with the Formula Fields

Hello Developers

i am new to the Salesforce, and i am trying to lear Formula fields, i have been given a task where Start Date and End date should show when custom field(Month__c) is selected, Now if i try to put Year, it shows error, 
 
Quota Start Date

DATE(
YEAR(TODAY()),
CASE(TEXT(Month__c), 
"January", 1, 
"February", 2,
"March", 3,
"April", 4,
"May", 5,
"June",6,
"July", 7,
"August",8, 
"September", 9,
"October", 10,
"November", 11,
"December", 12,
0),
1
)
----------------------------- 
Quota End Date

DATE(
YEAR(TODAY()),
CASE(TEXT(Month__c), 
"January", 1, 
"February", 2,
"March", 3,
"April", 4,
"May", 5,
"June",6,
"July", 7,
"August",8, 
"September", 9,
"October", 10,
"November", 11,
"December", 12,
0),
1
)

Now i want to add Picklist Field Name called Quater Year (Quater_Year__c), it consist of Number of Years from 2020 to 2030

So my requirement is when i select Picklist Quater Year as 2022 and Picklist Month as Jan, the Quota Start Date and Quota End Date should show for that particular Year i.e Jan 1st 2022 and Jan 31st 2022

but i am getting an error

User-added image
How do i resolve this issue??
Neha AggrawalNeha Aggrawal
Hi Nilima,

Replace Date(Year(Quarter_Year__c), with Date(value(text(Quarter_Year__c),
Rest looks ok.

Hope this helps
Thanks,
Neha
https://initaura.com
stev woodstev wood
Thanks for the post and nice to see this here. Spinning is one of the most popular exercises in today's life. Various best spin bikes are available online. The best spin bike for home use is going to be different depending on your personal needs.  https://bestspinbikes.me
rockstarr DJrockstarr DJ
Hi,
Formula Date 1 uses my Formula:
DATE(
YEAR(TODAY()),
MONTH(TODAY()),
IF(
MONTH(TODAY())= 12,
DATE(YEAR(TODAY()), 12, 31) - TODAY(),
DATE(YEAR(TODAY()),
MONTH(TODAY()) + 1, 1) - TODAY() - 1) +
DAY(TODAY()))

Formula Date 2 uses david's formula : 
 DATE(
     YEAR(TODAY()),
     MONTH(TODAY()) + 1,
     1
) - 1

the line "YEAR(TODAY()),MONTH(TODAY()) + 1," basically is saying "the 13th Month of the current Year, which does not exist (unless they abolish the Gregorian Calendar)  by Fmwhatsapp (https://fmwhatsappapk.xyz/)

I really think you need to use the Formula I posted (or something like it)
get more on https://success.salesforce.com/answers?id=90630000000hKAEAA2
park simpark sim
Thanks for sharing the nice post here. Online surveys are very popular at present. GreatPeople.Me is also called Great People Portal which is the official gateway where Kroger Employees can get to data and information. Go to greatpeople.me employee portal here. https://krogerfeedback.ninja/greatpeople-me/