1

I have a picklist with values from 1 to 31.It corresponds to the date. My requirement is to convert this number selected to a date. Lets say the number selected is 20 then it has to correspond to 20th April,2017. And when the system date is May then it has to take 20th May,2017. Can somebody help me figure out a way possible?

My requirement is to send an email to the team one day before the date that i form using the picklist number , which is on opportunity. Lets say the number selected is 20 then it has to correspond to 20th April,2017 as this month is April. and when its may it has to take 20th May. Until my opportunity Closed date, it has to check for every month and keep storing as 20th of every month. So that on 19th i can send an email that this opportunity is due the next day(which is 20th). Hope this helps.

5
  • you can use formula field to create date using this picklist value.
    – Ratan Paul
    Commented Apr 24, 2017 at 5:24
  • @RatanPaul just think about historical records, where you will see the current month's date. Actually requirement is not very clear Commented Apr 24, 2017 at 5:27
  • In Apex? Visualforce? Javascript? Where do you want to construct the date? Commented Apr 24, 2017 at 5:28
  • @SantanuBoral My requirement is to send an email to the team one day before the date that i form using the picklist number , which is on opportunity. Lets say the number selected is 20 then it has to correspond to 20th April,2017 as this month is April. and when its may it has to take 20th May. Until my opportunity Closed date, it has to check for every month and keep storing as 20th of every month. So that on 19th i can send an email that this opportunity is due the next day(which is 20th). Hope this helps.
    – Sowparnika
    Commented Apr 24, 2017 at 5:41
  • @BorisBachovski please check my previous comment addressing SantanuBoral. This is my requirement which is why i'm trying to convert the picklist number to date
    – Sowparnika
    Commented Apr 24, 2017 at 5:42

2 Answers 2

2

Please use below formula while creating the formula field to fulfill your requirement :

  1. Say your Picklist Field Name "CustomField__c" and values are 01,02,03...........and so on

  2. create formula field by using below formula : -

    DATE( YEAR(TODAY()), MONTH(TODAY()),VALUE(TEXT(publish__DateTimePick__c)))

it will should solve your purpose.

3
  • @Sowparnika, let me know is it working?if it is working for u accept the answer so that other can find it useful.
    – Avijit Das
    Commented Apr 24, 2017 at 5:54
  • It's april and its working but will this formula field automatically update when it's may?
    – Sowparnika
    Commented Apr 24, 2017 at 9:49
  • yes It is so , because you want to store the month value and year value from current system date.
    – Avijit Das
    Commented Apr 24, 2017 at 9:52
0

Salesforce does not evaluate workflow rule properly if we use formula field as a rule criteria. Though SFDC allows you to save the workflow rule.

So, time based workflow will not fire if you use formula field as workflow rule criteria.

Proposed Solution

Create a separate date field and update that date field through Process Builder based on picklist field selection.

formula to update date field will be:

DATE(YEAR(TODAY()),
 MONTH(TODAY()),
 VALUE(TEXT([Account].DatePicklist__c )))

Now, Create workflow rule and time based action to send an email on that date before one day.

It will solve your purpose.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .