Pre-Fill Case, Opportunity And Multiple Opportunity Product Records On The Form

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:

  1. 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:
image

[Optional] We can also add any fields from the Case and/or Opportunity Object that needs to be pre-filled on the form.

  1. Please edit the Case Pre-Fill field. Set the Case Lookup as the Formyoula Parent, and the Case ID as the Salesforce Parent field:
image
  1. On the Case Pre-Fill, we will pre-fill the Opportunity Lookup field and any other fields based on your requirements:
image
  1. 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:
image
  1. On the Opportunity Pre-Fill we can create field mappings to pre-fill any fields based on your requirements:
image
  1. Now, please Drag&Drop a Repeat Group on the form:
image
  1. 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:
image
  1. 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:
image
  1. 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:
image
  1. 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
image
  1. Next, please copy the Repeat Group field ID and paste it on the Product Salesforce Pre-Fill under the Advanced options:
image
image

[Optional] We can also use a filter on the Salesforce Pre-Fill for Repeat Group to limit the returned Product records:

image
  1. 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>
image

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:

image

You can import the attached example form in your Formyoula instance - https://app.formyoula.com/templates/import

Case, Opportunity And Opportunity Products.json18.3 KiB

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