function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Robb GRobb G 

soql & a global merge field type question?

SOQL allows this: SELECT fieldname FROM objectname
Then why does the documentation for global variables refer to "A global merge field type" ... because that somewhat suggests that the global variable $User, for instance, would also access the field names of object User but those fields, used by $User, are not the same as the fields represented in the object User?  I suppose I get the word "merge" becasue global variable $User is obviously a number of fields from various places (Or various tables) but with the words "field type" it suggests fields from the db.  Shouldn't that documentation say "A global merge variable type"?  Just saying.

 

bob_buzzardbob_buzzard
These are referred to as global merge field types because you use merge field syntax to access them, and they are global as you don't have to set them up before using them.  You can think of these like global sobjects that have their own schema, unrelated to the database.  In some cases (e.g. $Action) there is no connection to the database, its simply a global item that contains useful information to direct to the appropriate page for a specific action.