Working With Context Objects

When you are working with Work-Relay actions you can retrieve information about the current environment by using Work-Relay  context objects. Context objects provides information about your source object, variables, current user, environment, etc. You can use this information to define complex logic on your actions.

The Work-Relay application supports the following set of context objects.

"SourceObject" context object

When creating an Action you can set a Source object - the type of the object which will be used in action. 

When source object is selected you can use its fields to build formulas or to compare its values with query outputs. 

Select Context Object Type (1).

Now its fields (2) are available for using in formulas and queries. The application supports fields up to 4 level relationships.

"$System" context object

$System object contains the organization context information.


  • Date - value that indicating a current day.
  • DateTime - value indicating current day and time.
  • Time - value that indicates current time.
  • SessionID - current APEX session ID value.
  • Timestamp - current DateTime represented as a number of milliseconds since January 1, 1970, 00:00:00 GMT.
  • ForceBaseUrl - stores URL  value of the Salesforce instance.
  • ForceOrgUrl - stores URL value of current Organization.
  • IsBatch - returns true if the action is called from SF Batch.
  • IsFuture - returns true if the action is called from "future" method.
  • IsQueueable - returns true if the action is called from the SF Queue.
  • IsScheduled - returns true if the action is called from the SF Scheduled job.
"$User" context object

$User context object allows to work with logged in Salesforce user fields. 

"$Variables" context object

$Variables context object contains the current context variables set, that you pass to the action/group or defined in previous actions in case of Action Group.

Note: not all variables used in action can be available there - it depends on if they were used somewhere in the action previously or not.

"$Environment" context object

$Environment context object contains the form virtual fields.
Example: {$Environment.vf_phone} - where "phone" is the form virtual field name.

"$Settings" context object

$Setting custom object allows to use the Work-Relay custom settings (Salesforce Custom Settings).

"$Functions" context object

This is not actually an object - selecting this option user can see a list of functions available.

1 Comments

Work-Relay Administrator

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.