findOrCreate.linkToEntity

Use the findOrCreate.linkToEntity method to link the record you found or created to another record type.

Usage 

Links the record you’ve found or created using the findOrCreate.map.doFind and findOrCreate.map.doCreate methods to another record of a different record type that you created using a separate findOrCreate.map API call. For example, you can link a case record you found within your organization to a contact record you create.

The findOrCreate.linkToEntity method links the found or created record to one record. If you try to link a found or created record to multiple records, the found or created record is linked only to the first record.

The findOrCreate.linkToEntity method can’t be used to populate fields on records that you create by using the findOrCreate API call. Instead, use the findOrCreate.map method to update field values on records.

You can only link records if the parent record is created with a findOrCreate API call. You can’t link a child record to a record you found using the findOrCreate.linkToEntity method.

Note

Available in API versions 29.0 and later.

Syntax 

<input type= “hidden” name= “liveagent.prechat.findorcreate.linkToEntity: String entityName” value= “String parentEntityName, String fieldName” />

Parameters 

NameTypeDescriptionAvailable Versions
entityNameStringThe type of record which is linked to the parent record you found or created.Available in API versions 29.0 and later.
parentEntityNameStringThe type of parent record to link to the child record you found or created.Available in API versions 29.0 and later.
fieldNameStringThe name of the field in the record parentEntityName where the ID of the child record you found or created is saved.Available in API versions 29.0 and later.