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
LionLion 

Reg: Global Variable, Object & Merge Fields

Hi,

 

What is the difference between Global Variable, Global Object & Merge fields? How can we use them?

 

 

 

Regards:

New

 

Best Answer chosen by Admin (Salesforce Developers) 
Ispita_NavatarIspita_Navatar

Global variables as the name suggests is accessible across object and across UIs but merge fields are field of a particular record which is available on the object's record's detail page or any page which has the object as the standard controller. Merge field is an easy way of accessing information of a field in a record of object without querying it but it happens only if you are on detail page of the record or are on a page which has the standard controller set to the object in question.

Object can be compared to tables in any other normal database like MySQL or Ms SQL.

 

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.  

 

All Answers

jhurstjhurst

So the lines blur a little bit, but here goes:

 

Global Variable

These are organization level values that can be used.  This would include actions (like save and delete for objects), Labels, user information, etc...

 

Global Object

These are objects with bundled methods that you can use to reference data about the session you are using (like ApexPage details you are on,)

 

Merge Fields

These are record specific merge fields allowing you to access the details of the recors you are working with

 

Hope this helps

Jay

Ispita_NavatarIspita_Navatar

Global variables as the name suggests is accessible across object and across UIs but merge fields are field of a particular record which is available on the object's record's detail page or any page which has the object as the standard controller. Merge field is an easy way of accessing information of a field in a record of object without querying it but it happens only if you are on detail page of the record or are on a page which has the standard controller set to the object in question.

Object can be compared to tables in any other normal database like MySQL or Ms SQL.

 

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.  

 

This was selected as the best answer
Sophie EllisSophie Ellis
This is the topic I've found after searching for what I think I need - a global merge field. We have many email templates that we send to leads that include the price of our product(s). Is there a way I can specify the price of our product(s) once, then insert this variable as a merge field in our email templates? That way, when the price changes I can update the "global price" and all email templates will be correct.
Appreciate any advice.
Andrew