Table of Contents

Use an Edit Form to Create Records If They Don't Exist

Danielle Kellogg Updated by Danielle Kellogg

Scenario

You have two connected objects and you want users to use only one form to either create a new connected record or edit the existing connected record.

For example, you may want your users to be able to add a new Sales Rep to a Lead that doesn’t have one or edit the existing Sales Rep connected to a Lead, from the same form.

Requirements

The following are requirements for creating this form:

  1. The connected objects must have a one-to-many or one-to-one relationship. You can read more about connection types here.
  2. The form view must be adding a record for the parent object in the connected objects. This means for a one-to-many connection type, the object which only has one record connected. You can read more about parent-child objects here.

In this example, many Leads connect to one Sales Rep. So the form can be created to add or edit the one Sales Rep connected to a Lead.

Steps

Create a Details Page

In the Pages section of the Builder, create a new details page displaying a single Leads record.

If you’re not sure how to create a details page, this article will walk you through the steps.

Add a Form View to Add or Edit a Sales Rep

On the details page for Leads, add a form view that updates the connected Sales Rep: 

Login & Test

Now that you have set up your form now you can test it in your Live App. While viewing your page in the Pages section of the Builder, click the open icon or the "Go to Live App" button. This will open your Live App in a new window.

  1. Click to view the details for a Lead that has no Sales Rep connected to it.
  2. Fill out the form you created in step one and click the Submit button.
  3. Refresh the page and see your new Sales Rep connected to that Lead.
  4. You can then edit the Sales Rep you just created from the same form.

How did we do?

Track Which User Last Updated a Record

Contact