You are currently reviewing an older revision of this page.

Could not find variable 'env!clientMode'

Symptoms

The following errors are seen when using a!recordLink() to generate a URL for a record:

ERROR:An error occurred while evaluating expression: =rule![RULE_NAME] (Could not find variable 'env!clientMode') (Data Inputs)
Expression evaluation error in rule 'RULE_NAME' at function a!recordLink: Could not find variable 'env!clientMode'

Cause

SAIL functions like a!recordLink() return data types. This error occurs when fields from SAIL functions that return data types are used in expressions. Parsing internal CDTs like this is not a supported implementation, because they often change between versions and hotfixes. 

Action

Use the OOTB functionality included with urlforrecord() instead of building a link by parsing the output of a!recordLink(). 

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: December 2017