Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why I will get all the time this error?

Could not resolve the entity from value binding '{!order.test}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable.

OrderItem - Class:

public with sharing class OrderItem {

  public OrderItem(){

  public OrderItem(String contactId){
    this.contactId = contactID;

  public String test = 'test';

Contact - Extension Class

public with sharing class ExtendedContact {

public Contact contact {get; set;}

 public OrderItem order {
  get {
      if (order == null)
        order = new OrderItem();
      return order;


<apex:page standardController="Contact" extensions="ExtendedContact">
<apex:form >
  <apex:pageMessages />
  <apex:detail relatedList="true"/>
  <apex:pageblock title="ExtendedContact">
    <apex:pageBlockSection title="Title" columns="1">
    <apex:inputField value="{!order.test}" 
                    style="width:300px; height:100px" required="TRUE"/>

Thanks for any help.

share|improve this question

I think there are two issues:

  • apex:inputField can only bind to an SObject field (as it takes the type and label from the field metadata) but you are trying to bind it to a String; use apex:inputText instead
  • you have not provided get/set methods for OrderItem.test; one way to accomplish this is to change the code to initialise in the constructor and then use a public String test {get; set;} Apex Property
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.