A Tip A Day #35 – Test Time Dependant Workflows

This post is a part of the daily blog series 

A Tip A Day, daily dosage of learning!


Day #35 – Test Time Dependant Workflows

Here’s a workflow rule with Time Dependant actions as in the actions (field updates, sending email etc) happen after a certain time configured in the Time Trigger as shown below.  The current action of update happens 1 day after a Contact is created.

time dependant workflow salesforce sfdcfanboy

Like, I want to send an email to the Contact 1 day after joining.  Functionality wise, this is good.  No issues.  But before going live how do I test?

I created a contact, and I don’t want to wait a day to check if the contact receives the email.  Too long to wait to test.  Especially when the scenario is 15 days wait time, like escalate the Case after 15 days.  And the minimum time, we can mention in the time trigger is in Hours.  There’s no minutes or seconds.

So, the minimum hours I can put is 1 hour.  I still don’t want to wait 1 hour, you know.  There should be a way to do it.  I tried 0.5 hours and 0.1 hours.  Error!

Error: Must be a whole number

Error: Must be a whole number

Ah, that struck me!

“A whole number”

Whole number! I know “all non-negative numbers” are whole numbers.

0 (zero), of course, is a whole number

And then I tried 0 (zero) and hit save!  Boom!  No Error.  It was accepted.  Wow!

time-dependant-workflow-time-trigger-testing-salesforce-sfdcfanboy.png

So 0 (zero) hours after the contact is created i.e., almost instant yes!  There can’t be any closer time than this.  I created a contact.  And instantly I received the email because “0 hours”! yay!

Lesson

You must pay good attention to the error message.  Your solution almost and always lies in the error message.


Read all other tips of the blog series here – A Tip A Day, daily dosage of learning!


 

Advertisements

One Reply to “A Tip A Day #35 – Test Time Dependant Workflows”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s