You need to sign in to do that
Don't have an account?
steve_andersen
Getting a Contact lookup for Opportunity Contact Role ?
I've got a wizard for creating a new Opp which I referenced in a previous post. I want the user to have the option of selecting an existing Contact to be the primary Contact on the Opp. On my VF page I need a Contact lookup and then on Save I'll create the ContactRole for the Opportunity and use that Contact Id.
Problem is that I don't think I can get an inputField lookup without instantiating an object and then binding to the field. I can instantiate an Opportunity Contact Role object, but Contact is required on that object so the lookup on my VF page has the big red required flag. Selecting a Contact isn't required for my wizard, so that won't work.
My workaround is to instantiate a completely unrelated custom object that happens to have a Contact lookup field on it. I catch the Contact Id in there, and then us it to create the Contact role. It works. But it's ugly. Sharing this code now just got harder because there is now this dependence on a custom object that has nothing to do with this solution.
Any ideas? Thanks!
Steve
Problem is that I don't think I can get an inputField lookup without instantiating an object and then binding to the field. I can instantiate an Opportunity Contact Role object, but Contact is required on that object so the lookup on my VF page has the big red required flag. Selecting a Contact isn't required for my wizard, so that won't work.
My workaround is to instantiate a completely unrelated custom object that happens to have a Contact lookup field on it. I catch the Contact Id in there, and then us it to create the Contact role. It works. But it's ugly. Sharing this code now just got harder because there is now this dependence on a custom object that has nothing to do with this solution.
Any ideas? Thanks!
Steve
Steve