I have a very simple Visualforce Page with using custom object called employee__c

I'm trying to save the data whatever the user have entered in the page, but I'm not getting any error from my below code but the page is blank not showing any input fields at all....

here is my VF page code:

<apex:page Controller="EmployeeController" >
  <!-- Page Header -->
  <apex:sectionHeader title="Employee Edit" subtitle="New Employee" />

  <!-- Begin Form -->
  <apex:form >
    <apex:pageBlock title="Employee Informations" mode="edit"> 

      <apex:pageBlockSection columns="2" showHeader="true" title="Information"> 
        <apex:inputField id="firstName" value="{!emp.First_Name__c}" required="true" />
        <apex:inputField id="lastName" value="{!emp.Last_Name__c}"  required="true" />     

my controller:

public with sharing class EmployeeController {

    public ApexPages.StandardController controller; 

    Public Employee__c emp = new Employee__c();
    public Employee__c getemp()
        return emp;

    Public String First_Name {get; set;}
    Public String Last_Name {get; set;}  

    public EmployeeController(ApexPages.StandardController Controller)
        emp = (Employee__c)Controller.getRecord(); 
    public PageReference save() {
      insert emp; 
      return null;
  • 1
    Did you check the FLS and make sure the user has access to the fields?
    – Eric
    Oct 29, 2015 at 18:44
  • Do you mean that the page heading and page block are shown but no field label or input areas are shown at all when the page is initially opened?
    – Keith C
    Oct 29, 2015 at 22:39

1 Answer 1


Ensure the field level security is set to editable for your profile. Also you should have create permission on Employee object to create records

  • can you expand your answer little bit more so other might benefit from it, like how do you go after FLS and how do you create permission on the object
    – Nick
    Oct 29, 2015 at 18:49
  • go to your object details page. click on First_Name__c-> select edit field level security. select all the profiles.
    – Himanshu
    Oct 29, 2015 at 18:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .