Lookup Relationship & Dynamic Population from Web Form to Custom Object - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Joseph GarelJoseph Garel 

Lookup Relationship & Dynamic Population from Web Form to Custom Object

I'm a WordPress user and have a contact form that is able to Dynamically Populate records in SF. What I'm trying to do is create a job complete form where I can move my opportunity stage using Process Automation and inform people of next steps in the completion of a construction project. I’d also like to see these completed forms and their data in the related opportunity records for which they associate.

I’m trying to do this by using an AutoNumber function to number all opportunities with project numbers then dynamically populate that list to my webpage so a user can pick the correct project number. I then want to pass the opportunity that project number associated to into my project complete form under a Lookup Relationship to associate it to my originating opportunity.

As I pull the record related to my project number I have some options on how I want to see it and I’m pretty sure that’s where I’m going wrong. I know that I’m able to call out my Opportunity by project Number and then paste into any standard text filed in SF the Opportunity name that associated to that project number yet I’m not sure if ‘by name’ is the way to do this. Maybe I needed the opportunity ID or something else because loading in the exact right opportunity name into these Relationship Fields does nothing unless I do it from SF with the magnify glass next to that text field which would be empty as nothing passes into these fields from form on my website unless I manually do it.  (By nothing I only mean the Opportunity Name as it exactly appears in SF)

I'm unsure if I should be using a Lookup Relationship or if I should be looking for a Master Detail Relationship. More than that I don't know what concatenates a proper string in this regard when passing in form data from somewhere else.
Any help would be a real breakthrough for my tiny construction company and I’d be very grateful to hear any ideas or advise.
 
Thanks!
Joe
 
EdEd (salesforce.com) 
Hi Joseph,

I'm not really experiencing with passing form data from an outside form, but I don't think you would be able to use Master Detail relationship fields since you are dealing with standard objects, and the standard relationship between Contact and Opportunities is via the Contact Roles object(a junction object). If you currently have a way to populate the Opportunity Name into the Account based on the auto-number associated with the Opportunity, and you would like to easily access information on the Opportunity from the Contact, given that you only have a specific Opportunity you wish to be associated with the Contact, then perhaps using a Lookup relationship field on the Contact lookup to the Opportunity would be your option. Instead of the name, populate the lookup field with the ID of the Opportunity based on your project number.

Thanks!