+ Start a Discussion
Deepak Pandey 4Deepak Pandey 4 

My Account tabs field not working when i want to create pages? all tabs field working prpperlly. help me.!

Error: Could not resolve the entity from <apex:inputField> value binding '{!a.Account.Id}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable.
code-<apex:page controller="wizard_class">
  <apex:form >
  <apex:pageblock title="Enter Account Details">
  <apex:pageblockButtons >
  <apex:commandButton value="Next Page" action="{!gotopage2}"/>
  </apex:pageblockButtons>
  <apex:pageblockSection >
    <apex:inputField value="{!a.Account.Id}" />
    <apex:inputfield value="{!a.Name}" />
  </apex:pageblockSection>
  </apex:pageblock>
  </apex:form>
</apex:page>
 
Vivek DeshmaneVivek Deshmane
Hi Deepak,
Please try below code and let me know if this helps you.
-<apex:page controller="wizard_class">
  <apex:form >
  <apex:pageblock title="Enter Account Details">
  <apex:pageblockButtons >
  <apex:commandButton value="Next Page" action="{!gotopage2}"/>
  </apex:pageblockButtons>
  <apex:pageblockSection >
    <apex:outputfield value="{!a.Id}" />
    <apex:inputfield value="{!a.Name}" />
  </apex:pageblockSection>
  </apex:pageblock>
  </apex:form>
</apex:page>
Note:- Id is readonly field so use <apex:outputField> instead <apex:inputField> .
Best Regards,
-Vivek
Deepak Pandey 4Deepak Pandey 4
same proble same error. sir my code is ok. i thnk in my setting something going  wrong.
Amit Chaudhary 8Amit Chaudhary 8
Please try below code. I hope that will help u
-<apex:page controller="wizard_class">
  <apex:form >
  <apex:pageblock title="Enter Account Details">
  <apex:pageblockButtons >
  <apex:commandButton value="Next Page" action="{!gotopage2}"/>
  </apex:pageblockButtons>
  <apex:pageblockSection >
    <apex:inputField value="{!a.AccountId}" />
    <apex:inputfield value="{!a.Name}" />
  </apex:pageblockSection>
  </apex:pageblock>
  </apex:form>
</apex:page>

issue was in below line

<apex:inputField value="{!a.Account.Id}" />

Please let us know if this will help you

Thanks
Amit Chaudhary
Deepak Pandey 4Deepak Pandey 4
problem in my setting not in my code. my code is right.