+ Start a Discussion
Masie MaseliMasie Maseli 

An visualforce custom controller for three objects

Hi all, I need some assistance.
We have a wizard type visualforce page developmnet that uses 3 objects- Lead, Custom obj 1 and Custom obj 2. The custom objects all have lookup relationships with the lead object.
What is supposed to happen is that we will send you a link to a site that includes the Lead Id, Page 1 that opens up has lead fields that need updating and Custom obj 1 records that need to be created when you select the Continue button. And we need to pass the Lead Id to Page 2.
On Page two when selecting Continue a record for Custom Obj 2 needs to be created and the Lead Id that was passed from Page 1 needs to be assigned to the Lead field on Custom Obj 2. We also need the Custom Obj 2 ID to be passed on to the next page, Page 3.

Can anyone help with the controller?
please refer the sample wizard code which uses 3 standard objects. Similar way you can modify this code to use your custom objects.
Raj must be accustomed to stackoverflow where you just post links. What you need to do is define a getter and setter within your class for each object. Unfortuneately you are limited to three with Salesforce.