Activity Forums Salesforce® Discussions What is a Time Trigger in Salesforce?

  • Avnish Yadav

    Member
    September 10, 2018 at 2:41 pm

    Hello Anurag,

    Time-dependent actions are executed at a specific time, such as 10 days before a record’s close date. When that specific time passes, the workflow rule re-evaluates the record to make sure that it still meets the rule criteria. If the record does, the workflow rule executes those actions. This known as Time Trigger.

    Thanks.

  • shariq

    Member
    September 10, 2018 at 2:53 pm

    Hi,

    A setting that defines when time-dependent workflow actions should fire. When creating time-dependent actions and time triggers for workflow rules, consider the following :

    • When defining a time trigger, use standard and custom date and date/time fields defined for the object. Specify time using days and hours. The valid range is 0 to 999 days or hours
    • You can modify existing time triggers by adding or removing actions.

    Time Trigger Processing :

    • Time-dependent actions aren’t executed independently. They’re grouped into a single batch that starts executing within one hour after the first action enters the batch.
    • Apex triggers that fire as a result of time-dependent actions may get executed in a single batch or independently. Follow these best practices:
      • In case they fire independently–Ensure that your Apex logic is scoped for a single scheduled action. For example, don't use Apex static variables to communicate state across Apex code triggered by different scheduled actions.
      • In case they fire in a single batch–Be aware of how the combination of your time-dependent actions and Apex triggers impact your Apex governor limits.
    • Salesforce evaluates time-based workflow on the organization’s time zone, not the user’s. Users in different time zones might see differences in behavior.
    • Salesforce doesn’t necessarily execute time triggers in the order they appear on the workflow rule detail page. Workflow rules list time triggers that use the Before field first, followed by time triggers that use the After field.
    • Salesforce doesn't display time-dependent action controls on the workflow rule edit page if you set the workflow rule evaluation criteria to Evaluate the rule when a record is: created, and any time it’s edited to subsequently meet criteria.

    Limitations:

    • Time triggers don’t support minutes or seconds.
    • Time triggers can’t reference the following:
      • DATE or DATETIME fields containing automatically derived functions, such as TODAY or NOW.
      • Formula fields that include related-object merge fields.
    • You can't archive a product or price book that has pending actions.
    • You also can’t add or remove time triggers if:
      • The workflow rule is active.
      • The workflow rule is deactivated, but has pending actions in the queue.
      • The workflow rule evaluation criteria is set to Evaluate the rule when a record is: created, and every time it’s edited.
      • The workflow rule is included in a package.

    Hope this helps!

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos