• Mirembe
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi,
 
I created a visualforce page( on a custom object),  to overide my standard "New" Button. 
I used the input field component to input data into 2 required lookup fields but every time i type data into these fields i get an error message
Error: Required fields are missing: [Project__c, Training_Grant__c], 
my code looks like this;
 
<apex:page standardController="Training2__c">
<apex:form >
<apex:pageBlock title="Training Edit" mode="edit">
 <apex:commandButton action="{!save}" value="Save">
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:commandButton>
    </apex:pageBlock>
  </apex:form>
  <apex:form >
  <apex:pageBlock >
 <apex:pageBlockSection title="Project Information" columns="2">
        <apex:inputField value="{!Training2__c.Project__c}"/>
        <apex:inputField value="{!Training2__c.Training_Grant__c}"/>
        <apex:inputField value="{!Training2__c.Current_Balance__c}"/>
        <apex:inputField value="{!Training2__c.Total_TE_fee_Balance__c}"/>
        <apex:inputField value="{!Training2__c.TE_Balance__c}"/>

        <apex:inputField value="{!Training2__c.Region__c}"/>
    <apex:inputField value="{!Training2__c.Stichting_Funds_Approval_Date__c}"/>
         </apex:pageBlockSection>
   </apex:pageBlock>
    </apex:form>
</apex:page>
  • September 18, 2008
  • Like
  • 0
Hi,
 
I created a visualforce page( on a custom object),  to overide my standard "New" Button. 
I used the input field component to input data into 2 required lookup fields but every time i type data into these fields i get an error message
Error: Required fields are missing: [Project__c, Training_Grant__c], 
my code looks like this;
 
<apex:page standardController="Training2__c">
<apex:form >
<apex:pageBlock title="Training Edit" mode="edit">
 <apex:commandButton action="{!save}" value="Save">
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:commandButton>
    </apex:pageBlock>
  </apex:form>
  <apex:form >
  <apex:pageBlock >
 <apex:pageBlockSection title="Project Information" columns="2">
        <apex:inputField value="{!Training2__c.Project__c}"/>
        <apex:inputField value="{!Training2__c.Training_Grant__c}"/>
        <apex:inputField value="{!Training2__c.Current_Balance__c}"/>
        <apex:inputField value="{!Training2__c.Total_TE_fee_Balance__c}"/>
        <apex:inputField value="{!Training2__c.TE_Balance__c}"/>

        <apex:inputField value="{!Training2__c.Region__c}"/>
    <apex:inputField value="{!Training2__c.Stichting_Funds_Approval_Date__c}"/>
         </apex:pageBlockSection>
   </apex:pageBlock>
    </apex:form>
</apex:page>
  • September 18, 2008
  • Like
  • 0