Skip to main content
formatting code.
Source Link

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

<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> </apexVF page: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 with sharing class FlightRecor {
    public Spicejet__c airport {set;get;}

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

    public void submit(){
        insert airport;
    }
}

public void submit(){ insert airport;

} }

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

<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;

} }

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;
    }
}
Source Link

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

<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;

} }