The system determines whether to run certain Jelly expressions using JEXL or Rhino. If a table includes the string "ref," the wrong engine may be used and cause incorrect output.

Steps to Reproduce 

  1. In the Application navigator, type in the Filter navigator field and press enter or return on your keyboard.
  2. Open a record.
  3. Add the activity stream to the form.
  4. Click Update.
    Note that the activity stream does not load any data. This is caused by the use of a phase 1 ${} expression inside of a phase 2 $[] expression. Jelly determines if a $[] expression is evaluated as a JEXL expression or a Rhino expression. For example:

    Normally, the above expression is evaluated as a Rhino expression, which is what is intended. However, because sys_user_preference contains the substring “ref,” which has special meaning in Jelly, the expression is evaluated as a JEXL expression on that table. This causes the expression to evaluate incorrectly because the sys_user_preference GlideRecord variable is not defined in the JEXL variables; it is only defined in the Rhino context. This causes the expression to evaluate as “!null && null && !false.” Because null= false in JEXL, the expression is false.


A possible workaround is to rename the table so it does not contain “ref.” However, it is strongly recommended that you avoid the pattern $[${}]. To ensure that the expression evaluates as JavaScript to avoid this issue, replace the $[] with a g2:evaluate.

Related Problem: PRB742414

Seen In


Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:31:47