TaroWorks is also able to update records and append child records to a specific parent record in Salesforce. To identify which records you wish to update, you must first specify which one field in the object to search through - this is the purpose of the Id Field.
IMPORTANT: Not every field can be used as an ID field. TaroWorks will only allow you to use the following as an identifying field:
- Object Name;
- Autonumber field;
- Text Fields set as Unique;
- Text Fields set as External ID Fields; and,
- Last Name for the Contact Object
You must first map a specific field to a question first before it can be set as the Id Field, using the Contact object as an example:
- At the beginning when the object is just chosen, the Id Field has no valid options. This is because the field you choose as the Id Field must first be mapped to a question.
- Map the Last Name question in the survey to the Last Name field of the Contact object.
- Last Name now appears as a valid choice for the Id Field. Note that other fields such as Birthdate is not available, this is because only certain fields can be used as Id Fields.
Following the case above, Last Name is set as the Id Field. Thus if the field officer enter “Sisko” as the last name, what TaroWorks will do is to search all the Contact records for ones with “Sisko” as the last name and if found, update that record’s fields with answer from the survey.
If no Contact records with the last name of “Sisko” is found, then TaroWorks will create a new record using answers from the mapped survey.
It is very important to note the following when using the Id Field:
- If there are multiple records that match the criteria (eg. multiple Contacts with “Sisko” as his/her last name), TaroWorks will arbitrarily pick one to update. This should be avoided as it would generally cause undesired changes.
- To prevent such scenarios, we recommend using an unique identifier such as a membership number. Beside the standard option to use the set Record Name as Id Field, setting a text field as an External ID field or an Unique field is also acceptable as Id fields.
- For versions 2.22.2 and below, an Object Name field that is an autonumber cannot be mapped unless the object is set as a reference object. Please upgrade to version 2.23.x or above.
Please note the following behaviours regarding record update/upsert:
- Any survey questions that are hidden or not answered will preserve that value of their mapped fields. Thus it is not possible to delete values or clear picklists fields via updates, only replace them.
- Note that a Date (and Date-Time) question as well as mandatory questions can not be blank, so that they would always overwrite the existing values. This can lead to situations where a field officer can change the data inadvertently, the solution here is to design the survey such that the questions are hidden via logic.
- It is not possible to delete a record just by using TaroWorks alone.