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
Nikolay KrustevNikolay Krustev 

VisualForce page dont show custom fields that are not shown on Lead Layout

Hello,
i'm new to VF. I try to add a VF block in the standard Lead Layout.
I have created new custom fields and they ONLY show in the VF block if they are also placed in the standard Lead Layout.
I want them to only appear on the VF block because i want to arrange them in certain way that is not possible with std. Laad Layout.
Any pointers how to have them only in VF?
R Z KhanR Z Khan
Hi Nikolay,

you can remove the field from your layout by opening a record. Then press edit layout, find the field and remove it. In your code add that field on your VF page. 
Deepak GulianDeepak Gulian

It doesn't matter, If your custom field is added into the std. Lead layout or not and you can pull those custom fields in your VF page block and arrange according to your requirment!

Please share your VF page code!

Rajneesh Ranjan 23Rajneesh Ranjan 23
Hi Nikolay,

Page layout and VF page, these are two different ways of data representation to the user. Page layout is a built-in standard mechanism for displaying information to user. Once you create a VF page, write appropriate tag to reference all he fields that you want to display using either input or output tag.

Please post the code snippet if you need further assistance.

Thanks,
Rajneesh
Nikolay KrustevNikolay Krustev
Thank you guys for the response.
Here is the problem that i face
<apex:pageblocksection id="GeneralnformationKM" title="General Information" columns="4">
  <apex:inputField value="{!lead.KM_Deal_Type__c}"/>
  <apex:inputField value="{!lead.Vertical__c}"/>
  <apex:inputField value="{!lead.email}"/>
  <apex:inputField value="{!lead.phone}"/>
</apex:pageBlockSection>

if i have KM_Deal_Type__c in the standard Lead Layout it also shows on the VF block. If i remove it from the std layout it disapears from the block as well.
Any hints?
Nikolay KrustevNikolay Krustev
is anybody willing to help?