Skip to content

Create New Task Linked To an Account and Contact Records

In this guide we will demonstrate how to create a new Task record that is assigned to a new or existing Contact record that is linked to a new or existing Account record in Salesforce with a Formyoula mobile form. This mobile form can be completed while the mobile device is offline and the new record will be created on Salesforce once the device regains internet connection. Both Salesforce and non-Salesforce users can complete Formyoula mobile forms and the new records will be created on Salesforce. You can create any number of records on standard or custom object with a single Formyoula mobile form. Child record creation is supported using repeat group elements.



1. Go to Formyoula.com and click “Sign In”.



2. Click “New Form”.



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



4. Forms can have multiple pages. In this case we will use two pages, one for the Account and Contact details and the second one for the Task details.


5. Drag and drop fields for the Account record on the first page of your form. Add as many fields as you need. First we will drag and drop a Salesforce Lookup, that will be used if the Account already exists. Click on the “pencil” icon to edit the field.



6. Drag and drop a “Check-box” field. This will be used as a controlling field to select an option to create a new Account record.



7. Drag and drop any other fields you will need in case you are creating a new Account record.



8. Click on the “pencil” icon to edit the field. Click on the “Add Controlling Field”. This will be used to hide the fields for the new Account record in case if the Account record already exists and is found via the Salesforce Lookup.


Checkbox1.PNG


9. Select the check-box field under the “Controlling Field” section and select option “Yes” under the “Show If” section. Please make sure to add controlling field option for all the necessary fields. This will ensure that these fields will not be visible unless you tick the check-box.



10. Click on the “pencil” icon on the Salesforce Lookup field. Click on the “Add Controlling Field”.  Select the check-box field under the “Controlling Field” section and select option “No” under the “Show If” section. This will ensure to hide the lookup field in case if you are creating a new Account record.



11. Drag and drop fields for the Contact record on the first page of your form. Add as many fields as you need. First we will drag and drop a Salesforce Lookup, that will be used if the Contact already exists. Click on the “pencil” icon to edit the field.



12. Drag and drop a “Check-box” field. This will be used as a controlling field to select an option to create a new Contact record.



13. Drag and drop any other fields you will need in case you are creating a new Contact record. Click on the “pencil” icon to edit the fields.



14. Click on the “Add Controlling Field”. Select the second check-box that is used for the Contact record fields under the “Controlling Field” section and select option “Yes” under the “Show If” section. Make sure to add this option for all other fields.



15. Click on the “pencil” icon on the Salesforce Lookup field for the Contact object. Click on the “Add Controlling Field”.  Select the second check-box field under the “Controlling Field” section and select option “No” under the “Show If” section. This will ensure to hide the lookup field in case if you are creating a new Contact record.



16. Drag and drop all the necessary field for the Task record on the second page of your form.



17. Drag and drop a “Select” field. Click on the “pencil” icon to edit the field. Input matching values in the “Select Option” bar as you have on your Salesforce picklist field.



18. Click “Save & Close” to save your form.



19. 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.



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



21. First create the “Account” connection. Select “Account” from the available Salesforce Object list and click “Save”.



22. Set the “Insert Sequence” as “1”. This will ensure to create the new Account record or update the existing one first.



23. Select the “Account Lookup” from the available “Update based on lookup” list.


24. Click “Save Record Settings” when done.


25. Select the matching fields in both mapping sections and click “Create Map”.



26. Map all the other necessary fields from your form to the Salesforce fields.



27. When done, click on the “<< Back to Connections” button.



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



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



30. Set the “Insert Sequence” as “2”. This will ensure to create the new Contact record or update the existing one after the Account record is created or updated.



31. Select the “Contact Lookup” from the available “Update based on lookup” list.



32. Click “Save Record Settings” when done.


33. First map all the necessary fields for the new Contact record. Select the matching fields in both mapping sections and click “Create Map”.



34. Map the [New Account (Seq 1)] field to the “Account ID” field. This will ensure to link the Contact record to the new Account record, if a new one will be created.



35. Map the “Account Lookup” field to the “Account ID” field. This will ensure to link the Contact record to an existing Account record, if will be found via the Salesforce lookup.



36. Check if the mapping is correct.



37. When done, click on the “<< Back to Connections” button.



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



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



40. Set the “Insert Sequence” as “3”. This will ensure to create the new Task record after the Account and Contact records are created or updated.



41. Click “Save Record Settings” when done.



42. Map the “Account Lookup” field to the “Related To ID” field. This will ensure to assign the Task to an existing Account record.



42. Map the “[New Account (Seq 1)]” field to the “Related To ID” field. This will ensure to assign the Task to a new Account record.



43. Map the “Contact Lookup” field to the “Name ID”. This will ensure to assign the Task to an existing Contact record.



44. Map the “[New Contact (Seq 2)]” field to the “Name ID”. This will ensure to assign the Task to a new Contact record.



45. Map all the necessary field from you form to the Task object fields.



46. [Optional] you can map the “Form Name” to the “Subject” field. This will ensure that every Task record subject will be the form name, in this case “New Task”.


47. [Optional] you can map the “Created Date” to the “Due Date (Activity Date)”. This will ensure that every Task record will have the “due date” set as the date when the form entry will be captured.



48. Check if the mappings are correct.



49. When done, go to your Formyoula dashboard.



50. Click on the “Try” button next to the form. This will open the mobile web app.



51. Select the newly created form.



52. Fill in both pages of the form and click submit when done. You can create a Task that will be assigned to either created or updated Account and Contact records.


In this case we will lookup an existing Account record via the Salesforce lookup and will create a new Contact that will be linked to that Account, as well as the Task record will be assigned both to Account and Contact records.



53. Now, when you open Salesforce you will be able to see the newly created Task assigned to the new Contact record that is linked to the existing Account record.



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


Feedback and Knowledge Base