Skip to main content
2 of 2
formatting code.

when i insert record from vf page. i cannot see in model

VF page:

<apex:page standardController="Spicejet__c" extensions="FlightRecor">
   <apex:form >
    <apex:pageBlock >
    <apex:commandButton value="save" action="{!submit}"/>
        <apex:pageBlockSection >
          <apex:pageBlockSectionItem >
              Destination <apex:inputfield value={!Spicejet__c.Destination__c}"/>         
          </apex:pageBlockSectionItem>  
               <apex:inputfield value="{!Spicejet__c.Name}" />  
        </apex:pageBlockSection>   
    </apex:pageBlock>
   </apex:form>
</apex:page>

Apex code:

public with sharing class FlightRecor {
    public Spicejet__c airport {set;get;}

    public FlightRecor(ApexPages.StandardController controller) {
        airport= new Spicejet__c();
    }
    

    public void submit(){
        insert airport;
    }
}