The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

Salesforce Global Variables Blocked by LWS

LWS blocks access to some global JavaScript objects that are available to other Salesforce features.

Lightning web components don't have access to:

  • $A
  • Aura
  • Sfdc
  • sforce

LWS restricts access to these objects for Lightning web components because they are either deprecated or not supported for LWC.