I created a date/time field for First Distributed and need to figure out this logic into a formula:
First Distributed field should be populated (date/time) when the First Distributed field is NULL && the owner changed from a queue to a user.
1 answer
Try creating a Workflow Rule + Field Update like this -
- Setup | Create | Workflows & Approvals | Workflow Rules
- Select the object: Lead
- Set the Evaluation Criteria: created and every time it's edited [2nd OPTION]
- Set the Rule Criteria: formula evaluates to true
- Formula:
AND( LEFT(PRIORVALUE(OwnerId), 3) = "00G", LEFT(OwnerId, 3) = "005", ISBLANK(First_Distribution_Date__c))
- Click Save & Next
- Click Add Workflow Action from under the section Immediate Workflow Actions
- Select Field Update
- Select the Field to Update: First Distribution Date
- Select Use a Formula to Set the New Value
- Formula:
TODAY()
Note: If this is a Date/Time field, use NOW() - Click Save
- Hit Done
- Activate
That should do it.