Can anybody help me to find official description or any other information about global SalesForce JavaScript objects (not Visualforce global variables)?

I know that there are exists some JS objects which are defined by SF, for instance UserContext, but I can't to find any information about it. I note again, I don't mean Visualforce Global Variables, which are available in expression syntax, like {!$User.FirstName}.

Maybe, it's related to JavaScript Remote Objects?

  • I do not believe they are published anywhere as their use by us is unsupported and thus no need of documentation. When they are used by us it is considered a "hack"
    – Eric
    Oct 20, 2015 at 12:19
  • @Eric, hm, I hope, such js objects are "standard" feature. I would not like to use "hacks", since there is no guarantee that they will not be broken in the future. Oct 20, 2015 at 12:31
  • If I am understanding what you are talking about (the JS included with a VF page when it is delivered to the client application), they are not standard objects - they are just included by Salesforce to do what SF needs to do
    – Eric
    Oct 20, 2015 at 12:33
  • There are some of these like sforce. There is no global definition, as they are feature specific (such as some for S1 Mobile Visualforce and some for Canvas API). They are typically documented with the feature they support, i.e. no single place where they are documented.
    – pchittum
    Oct 20, 2015 at 12:51
  • It's also worth noting that Salesforce explicitly mentions in their internal JS libraries that you shouldn't reference them, as they are subject to change without notice. This would likely break your code in some way, so use them at your own risk...
    – JCD
    Oct 20, 2015 at 13:53


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.