I am having two object reservation and contact are in look-up relation. I want to insert the page details as attached in the image in their respective objects with a particular contact record and particular Reservation record created after save button clicked from VF page.
VF page contain following fields:
FirstName LastName Phone (Contact object) Booking Time/Date(Required field in Reservation field)
Customer_Name__c (as Look-up)
I have attached the image of my Visualforce page. Please Suggest me the visualforce and controller code to complete my task.I am new to salesforce and unable to proceed with coding using VF and apex code.
Best Answer
So what you have to do is create custom controller, create VF page with custom controller. You have to create those objects in controller constructor, then display in page required fields. Last thing is creating custom save button calling save action from controller
Bit of page
I hope this will help you. In case of any trouble - please let me know - I will try to help you