Create or Update Multiple Contact Records and Link Them to a New Task Record

In this guide, we will demonstrate how to create or update multiple Contact records that are linked to an existing Account record using a repeat group feature. We will also create a new Task record that will be linked to the new and existing Contact records.


  • First part of the guide (Salesforce).


We need to enable the activity setting that allows users to relate multiple contacts to Task and Events.

1. Please go to your Salesforce Setup page and type in the search box “Activity settings”.



2. Tick the “Allow Users to Relate Multiple Contacts to Tasks and Events” check-box and please wait for a couple of minutes for this functionality to be enabled.


Enable_TasksPNG


  • Second part of the guide (Formyoula).



1. Please go to Formyoula.com and click “Sign In”.



2. Click “New Form”.



3. Click “Rename” to give your new form a name.



4. Drag and drop a Salesforce Lookup field from the “Salesforce” section. This will be used to search for existing Account records in Salesforce.



5. Click on the “pencil” icon and edit the Salesforce Lookup field. We will name the field label as “Find Account Record” and we will select “Account” from the available “Object” list.



6. Please drag and drop all the necessary fields for the Task record creation. We will use one text field for the “Subject” and two select fields for the “Status” and the “Priority”.



7. Next, please drag and drop a “Repeat Group” element on your form from the “Select” section. Click on the “pencil” icon and edit the field. In this case, we will change the label to “Contact”.



8. Drag and drop a Salesforce Lookup field inside the repeat group section. This will be used to search for existing Contact records in Salesforce. Change the label to “Find Contact Record” and select “Contact” from the “Objects” list. Also, we will display email as an additional field on the lookup element by adding the following API names: Name , Email



9. Drag and drop all the necessary fields inside the repeat group for the Contact record update or creation.



10. We will hide the Contact record fields, such as First Name, Last Name and Email in case if the Contact record already exists in Salesforce. Please click on the pencil icon on each of these fields and click on the “Add Controlling Field” button. Select the Contact lookup field under the “Controlling Field” section and select “No” from the “Show If” section.



11. Once all the fields are added, please Save and Close the form.



12. Click on “(Add)” under the “Connections” column or click on the “Create a Connection” button, or select “Add/Edit Connections” from the “Actions” available list.



13. Select “Salesforce” from the available connections list and click “Create Connection >>”.



14. Select “Contact” from the available Salesforce Object list and click “Save”.



15. First, please select the Contact lookup field under the “Update based on lookup”. This will ensure to update existing Contact records in Salesforce.



16. Next, please select the repeat group element “Contact” under the “Use Repeat Group” section. This will ensure to create or update multiple records in Salesforce.



17. Save the record settings when done.



18. Now please map the Account Lookup field to the Account ID field in Salesforce. This will link the new or existing Contact records to an existing Account record in Salesforce.



19. Next, please map all the other necessary fields for the Contact object.



20. Once done, please click ok the “<< Back to Connections” button.



21. Select “Salesforce” from the available connections list and click “Create Connection >>”.



22.  Select “Task” from the available Salesforce Object list and click “Save”.



23. Now we need to map our Account lookup field to the Salesforce Related To ID (WhatId) field. This will ensure to link the new Task record to an existing Account record in Salesforce.



24. Next, please map all the other necessary fields for the Task object record.



25. Once done, please click ok the “<< Back to Connections” button.



26. Select “Salesforce” from the available connections list and click “Create Connection >>”.



27. Select “Task Relation” from the available Salesforce Object list and click “Save”.



28. First, please select the repeat group element “Contact” under the “Use Repeat Group” section. This will ensure to assign multiple Contact records to the Task record.



29. Save the record settings when done.



30. Next, please map the [New Task Record ID (Seq. 2)] to the Task ID. This will ensure to link the Contact records to the newly created Task record.



31. Next, please map the [New Contact Record ID (Seq. 1)] to the Relation ID. This will ensure to add the new Contact records to the new Task record.



32. And please map the Contact lookup field to the Relation ID. This will ensure to add the existing Contact records to the new Task record.




33. Once done, please click on the green “Try Form >>” button on the top of the page. This will open the mobile web app.



34. Select your newly created form.



35. Find an existing Account record in Salesforce.



36. Enter the details for the new Task record.



37. Click on the repeat group section to add Contact records. With the first repeatable section, we will add an existing Contact record from Salesforce.



38. Once added, please add a new repeat group section. We will use this to create a new Contact record.



39. Once done, please submit the form entry.



40. Now in Salesforce, you will be able to see the existing Contact record and the new Contact record that are linked to an existing Account record.



Also, you will see the newly created Task record that will be assigned to each Contact record  that was captured on the form entry.




For any questions, please contact us - support@formyoula.com.



Feedback and Knowledge Base