EspoCRM icon

EspoCRM

CRUD no EspoCRM (entidades dinâmicas por instância)

Relacionamentos → Vincular relacionado

AI-generated

Summary

Link a related record to a specified record within a selected EspoCRM entity using a defined relationship field.

Inputs

  • entity (required) — The EspoCRM entity name where the main record exists.
  • recordIdRelationship (required) — The ID of the main record to which a related record will be linked.
  • relationshipLinkField (required) — The relationship field name that defines the relation between the records.
  • relatedRecordId (required) — The ID of the record to be linked as related.

Output shape

a single record containing the API response to the relationship linking request.

The response JSON contains details of the linking operation. An error is thrown if the operation fails.

Examples

Example 1: Link a Contact record (relatedRecordId) to an Account record (recordIdRelationship) via the 'contacts' relationship field of the Account entity.

Set 'entity' to 'Account', provide the Account record ID in 'recordIdRelationship', select 'contacts' as 'relationshipLinkField', and set the Contact record ID in 'relatedRecordId'.

Links

Discussion