In an effort to retrieve the current user in JavaScript on a Salesforce page, I came across this command:
$A.get("$SObjectType.CurrentUser")
This is great because it works. What's not great is that I have no idea what it means.
I'm looking for one or more of the following:
- What does each part of the command mean?
- Is there documentation I read about this? (I don't know what to call it, so am having a hard time searching for it)
- What other types of values can I search for with this? It would be great if I could retrieve other objects on the page.
So far I've been able to figure out that $A
appears to be a namespace for Aura, which I've found limited documentation at /auradocs/reference.app#reference?topic=api:$A
. It includes the methods that can be called, but I don't know what parameters are available.
When looking at the JavaScript on the page it also looks like the "values" that can be used include: CurrentUser
, userLocaleLang
, containerVersion
, communityPrefix
, eswConfigDeveloperName
, LightningRichTextButton
.