Prevent Creation of Function Expressions in Dynamically Created Aura Components (Previously Released Critical Update)

To improve security and stability, this critical update prevents attribute values passed to $A.createComponent() or $A.createComponents() from being interpreted as Aura function expressions. This critical update was first made available in Summer ’19.

Where: This change applies to orgs with Lightning components in Lightning Experience, Salesforce Classic, and all versions of the Salesforce app.

When: Salesforce will automatically activate this critical update on the auto-activation date listed on the Critical Updates page in Setup.

Why: When the critical update is activated, using the key-value pair {"exprType": "FUNCTION"} in an object passed as an attribute value to $A.createComponent() or $A.createComponents() throws an error instead of triggering unpredictable behavior.

How: To test this critical update, we recommend working in a sandbox.

  1. From Setup, enter Critical Updates in the Quick Find box.
  2. Select Critical Updates.
  3. Review the details for the “Prevent Creation of Function Expressions When Using $A.createComponent() or $A.createComponents() in Aura Components” critical update.
  4. Click Activate.
  5. Test that custom Aura components that you’ve developed are working correctly.