You need to sign in to do that
Don't have an account?

Lookup field for non-Sobject field
Hi
I have created an Apex class called relation. It has a public field of type contact. I want to input this contact from a VF page.
When I add
<apex:inputField value="{!relation.contact}"
I get this exception:
<apex:inputField> can only be used with SObject fields.
I added a public contact field in my controller called C.
I tried to use the contact from my controller but again got the same error.
Why is lookup bounded to SObject fields and not SObject types?
its work for me
Page :
Class :