I have developed a visualforce page + controller that fetches and displays data from a back end REST server for a given lead.
How do I add this page to the lead details page layout so that everyone,who can see the lead, can see it?
You need to use a Standard Controller
and an extension.
Markup
<apex:page standardController="Lead" extensions="MyExtension">
Code
public with sharing class MyExtension
{
public MyExtension(ApexPages.StandardController controller)
{
}
}
The extension itself is optional, but if you want to include your page as a custom button or on the Layout, you absolutely must use the appropriate standardController
attribute on your <apex:page>
tag. See also: Use Visualforce Pages in Page Layouts and Mobile Cards