This guide will explain how to open a new form with a prefilled Record ID by clicking a Salesforce Table Button.
First Form-
- 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.
- Configuring The âSalesforce Tableâ Field:
- Click the pencil icon of the âSalesforce Tableâ field.
- Set âObjectâ and âSelect Table Columnâ as shown below.
- Add âCustom Table Columnsâ as shown below.
- These columns will be displayed on the form.
- 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.
Note: Please check out the âSalesforce Tableâ field functionality in detail using this guide- https://guides.formyoula.com/public-guides/salesforce-table-field
- Configuring The âField Update Workflowâ Field:
- Click the pencil icon of the âField Update Workflowâ field.
- Set âRule Criteriaâ:
Record ID || not equal to ||
- Set âField Updates Successâ:
Navigate to the another form || event || run
- Configuring The âHTMLâ Field:
- Click the pencil icon of the âHTMLâ field.
- Paste the code.
- 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>
- Configuring The âNavigationâ Field:
- Click the pencil icon of the âNavigationâ field.
- Set âButton Actionâ as âCancel And Close Formâ.
- Click âOpen New Formâ.
- 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
- Note: You can copy the form ID of the second form from the form edit page URL.
- 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.
Second Form -
- Initial Setup:
- Drag and drop a âSalesforce Lookupâ field onto your form.
- Rename the field as needed.
- 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.
- Test Your Form:
- The âSalesforce Tableâ will display the records on page load.
- Clicking the button for a record will open the second form with the Prefilled record ID.
For any questions, please contact us - [email protected] or the Formyoula in-app chat. đ