Open a New Form With a Prefilled Record ID by Clicking The Table Button

This guide will explain how to open a new form with a prefilled Record ID by clicking a Salesforce Table Button.

First Form-

  1. Initial Setup:
  • Drag and drop a ”Salesforce Table”, a “Hidden”, a “Field Update Workflow”, an “HTML”, and a “Navigation” field onto your form.
  • Rename the fields as needed.
image
  1. Configuring The “Salesforce Table” Field:
  • Click the pencil icon of the “Salesforce Table” field.
  • Set “Object” and “Select Table Column” as shown below.
image
  • Add “Custom Table Columns” as shown below.
  • These columns will be displayed on the form.
image
  • Add the field ID of the "Hidden" field to the button column under the options. This will update the Hidden field with the Record ID when the button is clicked.

image

Note: Please check out the “Salesforce Table” field functionality in detail using this guide- https://guides.formyoula.com/public-guides/salesforce-table-field

  1. Configuring The “Field Update Workflow” Field:
  • Click the pencil icon of the “Field Update Workflow” field.
  • Set “Rule Criteria”:
    • Record ID || not equal to ||
image
  • Set “Field Updates Success”:
    • Navigate to the another form || event || run
image
  1. Configuring The “HTML” Field:
  • Click the pencil icon of the “HTML” field.
  • Paste the code.
image
  • Please use this code.
  • Make sure to update the field ID as per your form.
  • Here, ‘d320-7292-86dd’ is the field ID of the “Navigation” field.
<style>
#component-d320-7292-86dd {
  display: none;
}
</style>
  1. Configuring The “Navigation” Field:
  • Click the pencil icon of the “Navigation” field.
  • Set “Button Action” as “Cancel And Close Form”.
image
  • Click “Open New Form”.
image
  • Add the form ID of the second form under the “Open New Form Id” option as shown below.
    • For example: Here, 669df77ad15917001b13dd3c is the form ID of the second form
image
  • Note: You can copy the form ID of the second form from the form edit page URL.
image
  • Add the field ID of the “Salesforce Lookup” field from the Second form under the “New Form Field Id” option.
    • For Example: Here, 08f1-89a4-bd2f is the field ID of the Lookup field on the second form.
  • Add the field ID of the “Hidden” field from the First form under the “Merge Field Value” option.
    • For Example: Here, c6fe-f7f8-309c is the field ID of the Hidden field on the first form.
  • It will update the Lookup field on the second form with the value from the Hidden field on the first form.
  • Save the changes.
image

Second Form -

  1. Initial Setup:
  • Drag and drop a “Salesforce Lookup” field onto your form.
  • Rename the field as needed.
image
  1. Configuring the “Salesforce Lookup” Field:
  • Click the pencil icon of the “Salesforce Lookup” field.
  • Set “Object” and “Display Additional Fields” as shown below.
  • Save the changes.
image
  1. Test Your Form:
  • The “Salesforce Table” will display the records on page load.
image
  • Clicking the button for a record will open the second form with the Prefilled record ID.
image

For any questions, please contact us - [email protected] or the Formyoula in-app chat. 🙂