Aggregate Count using Salesforce Prefill

In this guide, we will explain how to use a Salesforce Prefill with an aggregate COUNT(Id) query to display the number of Contacts related to a selected Account in a Formyoula form. 1. Initial setup:

  • Drag and drop a “Salesforce Lookup”, a “Salesforce Prefill” and a “Number” field onto your form.
  • Rename the fields 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.
image
  1. Configuring The “Salesforce Prefill” Field:
  • Click the pencil icon of the “Salesforce Prefill” field.
  • Set “Object”.
  • Set “Formyoula Parent Field” and “Salesforce Parent Field” as shown below.
image
  • Set the Number (Count Of Total Contact) file under the “Form Field” option.
  • Add COUNT(Id) under the “Object Field” option.
image
  • Note: Click "Switch to Text" to enter a query for this option.
image
  1. Test Your Form:
  • Search for an account using the Lookup field.
  • The total number of contacts linked to that account will be displayed.
image

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