Ask Search:
Kelly JavanmardiKelly Javanmardi 

Need help with a formula field

I am a little rusty with Salesforce, as I haven't been doing Admin-style duties for a few years, so I am having a hard time remembering how to create some basic automation formulas. I am trying to autopopulate a date field with a date time stamp when the lead status field is changed to a particular option. Specifically, I want to auto-add the date to a "Demo Performed Date" field with the Lead Status is changed to "Demo Performed". Does anyone have any tips on how to accomplish this? I would also love to do a similar automation of checking the "Demo Scheduled" box when the Lead
status is changed to "Demo Scheduled".
Best Answer chosen by Kelly Javanmardi
Narender SinghNarender Singh
Hi Kelly,

Create a workflow on Lead object,

Evaluation Criteria: When the record is created or edited (2nd radio button)

Rule Criteria:
AND(
ISCHANGED(Status),
TEXT(Status) = "Demo Performed"
)

Now add a field update action under "Immediate Actions" section.
Select the date field from the drop down and use this formula:
TODAY()


 

All Answers

Nicole PomponioNicole Pomponio
For the demo scheduled - You can create a Formula Field on the Lead object and make it a check box. 

In the formula field, you can have the following as the formula - 
(ISCHANGED(Status) && ISPACKVAL(Status = "Demo Schedule"))
Narender SinghNarender Singh
Hi Kelly,

Create a workflow on Lead object,

Evaluation Criteria: When the record is created or edited (2nd radio button)

Rule Criteria:
AND(
ISCHANGED(Status),
TEXT(Status) = "Demo Performed"
)

Now add a field update action under "Immediate Actions" section.
Select the date field from the drop down and use this formula:
TODAY()


 
This was selected as the best answer
Dhairya MistryDhairya Mistry
Multiple ways you can achieve this - Workflow field update, process builder or even formula field. IF you want users your update at later stage go with Workflow field update or process builder. I personally prefer Process Builder as it will allow you to do mulitple things besides ust updated a field with same flow. 

Here's the process builder Trailhead module: https://trailhead.salesforce.com/en/content/learn/modules/business_process_automation/process_builder (https://trailhead.salesforce.com/en/content/learn/modules/business_process_automation/process_builder" target="_blank)
  • Create a new process builder process
  • Select the object you want to run this process on
  • Select if it will be for only when record is created or when it is created and everytime updated. (For you it may be created and everytime it is updated)
  • Add the criteria - to select the Lead Status is changed equals Demo Performed. (I would use ISCHANGED / is changed in dropdown instead equals value. So every time someone update the record it would not update the date. Insted when that field value is set to Demo Performed.)
  • Set Action - If Demo Performed Date is balnk add TODAY()

Hope that helps.