You need to sign in to do that
Don't have an account?
Amit Jadhav 13
Error: Could not resolve the entity from <apex:inputField> value binding '{!Ord.Status}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable.
<apex:page controller="costsheet">
<apex:form >
<apex:pageblock >
<apex:pageblockSection >
<table>
<tr>
<td><apex:inputField value="{!Ord.Status}"/></td>
</tr>
</table>
</apex:pageblockSection>
</apex:pageblock>
</apex:form>
</apex:page>
<apex:form >
<apex:pageblock >
<apex:pageblockSection >
<table>
<tr>
<td><apex:inputField value="{!Ord.Status}"/></td>
</tr>
</table>
</apex:pageblockSection>
</apex:pageblock>
</apex:form>
</apex:page>
The line: <apex:inputField value="{!Ord.Status}"/> uses API names of both object and field. So if "Ord" and "Status" are your custom object and custom field respectively, then please go through setup--> objectManager, click on Org and select the exact API names (along with __c) for "Ord" object and "Status" field and try replacing them in the above line.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
All Answers
The line: <apex:inputField value="{!Ord.Status}"/> uses API names of both object and field. So if "Ord" and "Status" are your custom object and custom field respectively, then please go through setup--> objectManager, click on Org and select the exact API names (along with __c) for "Ord" object and "Status" field and try replacing them in the above line.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
But Above code is working my Production but when
I am trying This Code in My sandbox then This error Can Show.
Greetings to you!
If API name is correct and the same code is working in production then you need to check the field level security in the sandbox.
Visualforce honors Field Level Security. Please check your field's security settings to make sure your profile has access to it.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
The solution provided to you before should do the job for you but if there is an issue between your production and sandbox, this might be due to your internal sandbox issue.
For this, you will have to look it by yourself, ensure that both the orgs (production and sandbox) have similar API names. After this try creating a new vf page and try saving it there. This might help you.
Thanks,
Ajay Dubedi