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
Sean DaggerSean Dagger 

Getting the object type value

Hi

Is there a global merge field where I can obtain the object id of the object currently being viewed?  ie,

if on a development page: get a09
if on client page: get 001
if on contact page: get 003
if on plots page: get a0C

I am overiding the help for this page link found on all pages which points to an sControl I have built.  because my code is in this scontrol, I cannot simply grab the url string (which contains the object id).  I have to get the document.referrer to get the url string for me, which works fine in firefox but microsoft no longer support this feature.  To solve my problem, could you possibly advise on how I can get the object id from within an Scontrol or get the http string from the referring page?

Many thanks for you help.

Best regards

Sean.

The Custom CloudThe Custom Cloud

Only 2 years late but you can get the object id by using the ObjectType global merge field.

 

For example:

{!$ObjectType.Account}

 

This will work in most places including VF pages (replacement of s-controls).