You need to sign in to do that
Don't have an account?
siva sai 22
Could not resolve the entity from <apex:inputField> value binding '{!Opportunities.Name}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable.
Hi,
i created an apex class in that one i want to add each Opportunity in to list of Opportunities but in vf page i am getting an error "Could not resolve the entity from <apex:inputField> value binding '{!Opportunities.Name}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable."
Here is my code :
i created an apex class in that one i want to add each Opportunity in to list of Opportunities but in vf page i am getting an error "Could not resolve the entity from <apex:inputField> value binding '{!Opportunities.Name}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable."
Here is my code :
Apex code:: public class Opportunity_List { public List<Opportunity> Opportunities {set;get;} public Opportunity Oppos {set;get;} public Opportunity_List(){ Opportunities = new List<Opportunity>(); Oppos = new Opportunity(); } public void add(){ Opportunities.add(Oppos); } public void cancel(){ Opportunities.clear(); } } VF Code:: <apex:page controller="Opportunity_List" > <apex:form> <apex:pageBlock title="Opportunity"> <apex:pageBlockButtons> <apex:commandButton value="ADD" action="{!add}" /> <apex:commandButton value="Clear" action="{!cancel}" /> </apex:pageBlockButtons> <apex:pageBlockSection > <apex:inputField value="{!Opportunities.Name}" /> <apex:inputField value="{!Opportunities.LeadSource}" /> <apex:inputField value="{!Opportunities.ExpectedRevenue}" /> <apex:inputField value="{!Opportunities.NextStep}" /> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
could any one tell me that why it is comming like this..
Thanks and Regards
krishna
for resolve this error you have need to use <apex:repeat> tag.
use below code :
i hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
http://sfdcmonkey.com
using repeat tag i am unable to reslove this
Thanks & Regards
krishna
krishna
i hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
http://sfdcmonkey.com