In this guide, we will explain how to pre-fill multiple Object records on your Formyoula form by selecting a single Parent Case record.
Form Setup:
- Please Drag&Drop two Salesforce Lookups and two Salesforce Pre-Fill on the form. One set will be used for the Case Object and one for the Opportunity Object:
[Optional] We can also add any fields from the Case and/or Opportunity Object that needs to be pre-filled on the form.
- Please edit the Case Pre-Fill field. Set the Case Lookup as the Formyoula Parent, and the Case ID as the Salesforce Parent field:
- On the Case Pre-Fill, we will pre-fill the Opportunity Lookup field and any other fields based on your requirements:
- Next, please edit the Opportunity Pre-Fill by setting the Opportunity Lookup as the Formyoula Parent field and the Opportunity ID as the Salesforce Parent field:
- On the Opportunity Pre-Fill we can create field mappings to pre-fill any fields based on your requirements:
- Now, please Drag&Drop a Repeat Group on the form:
- Next, please Drag&Drop the necessary Opportunity Product fields inside the Repeat Group. We will use a Product Lookup (Pricebook Entry Object) as well as Quantity and Sales Price fields:
- Next, please Drag&Drop another Salesforce Pre-Fill underneath/outside of the Repeat Group. We will use this to pre-fill the Products inside the Repeat Group using the Opportunity Line Item Object:
- Please edit the Pre-fill field by setting the Opportunity Lookup as the Formyoula Parent field and the Opportunity ID as the Salesforce Parent field:
- Please map the fields from inside the Repeat Group that need to be pre-filled:
- Product Lookup - Price Book Entry ID
- Quantity - Quantity
- Price - List Price
- Next, please copy the Repeat Group field ID and paste it on the Product Salesforce Pre-Fill under the Advanced options:
[Optional] We can also use a filter on the Salesforce Pre-Fill for Repeat Group to limit the returned Product records:
- We can also hide new Repeat Group section and the delete button by using the below HTML:
<style>
#component-e1d9-dcdf-c218 .new_repeat_entry_panel {
display: none;
}
#component-e1d9-dcdf-c218 .existing_repeat_entry_panel .delete {
display: none;
}
</style>
Form Example
Now, once we start the form and find a Case record, all the data will be automatically pre-filled on the form, including the Case record fields, Opportunity and Opportunity Product record:
You can import the attached example form in your Formyoula instance - https://app.formyoula.com/templates/import
For any questions, please contact us - [email protected] or the Formyoula in-app chat 🙂