You need to sign in to do that
Don't have an account?
Assh
Master detail relationship on Visualforce
Hi,
I have created a custom object called Employment details. I have master detail relationship between Emplyment details object and contact object. I am developing a visualforce page to enter employment details. In this page , I need to select contact from standard object contact to associate particular contact to employment details. How to acheive this in visualforce? I am a beginner in Visulaforce. If anybody has an idea about this please let me know. Your help is greatly appreciated
Thank you,
Assh.
In this case you'd just use an InputField bound to the contact field on your employment details record.
For example, if your employment details object is Employment_Details__c and the contact field is Contact__c, then you'd use markup similar to the following:
This will generate you a lookup field to select a contact.
All Answers
In this case you'd just use an InputField bound to the contact field on your employment details record.
For example, if your employment details object is Employment_Details__c and the contact field is Contact__c, then you'd use markup similar to the following:
This will generate you a lookup field to select a contact.
Thank you for your response. I implemented that way and it worked. I have one problem here. When I enter contact name , it does not allow me to lookup contact list. Suppose the name is not in the contact , and, I try to save then it displays "Error: No matches found". How can I have lookup functionality on the Visualforce page so that I can select contact from the contact list? It is working fine if I enter contact name which is already in the contact list.Please help me on this.
Thank you,
Assh
Hi,
Actually, I had added some style sheet static resource and that caused the problem with the contact field. I removed the style sheet now. and I can search in the contact filed.
Thank you ,
Assh