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

Custom Components and the Record in Context?

What's the best, or most straightforward, way for a custom component to get details about the record in context in the enclosing VisualForce page? Or at least the record ID? Will the record ID always be found in the "ID" parameter of the enclosing page?



Ron HessRon Hess

for pages with a standard controller , yes the ID is available, or it is a new record.


if you want the component to be used in other controllers, it may not be there.  you can specify the ID as a required attribute , then it will always be passed into your component , from whatever page would like to use it.