LinkRelatedRecords
Creates a relationship between two records across modules, such as linking a quote to a deal.
Procedure-Specific Information
ZohoCRM supports updating the relations for some specific modules and for adding the relation it requires ModuleName, Related ModuleName, RecordId of the module and RecordId of the related module.
ZohoCRM Requires atleast one related object in the request body to perform this operation and it can be added using the RelatedRecordsAggregate parameter.
For Example:
INSERT INTO LinkRelatedrecords#TEMP(RelatedRecordId#1,MemberStatus#1,RelatedRecordId#2,MemberStatus#2) values('4482327000000271429','Active','4482327000000271430','');
INSERT INTO LinkRelatedrecords#TEMP(RelatedRecordId#3) values('4482327000000271431');
EXEC LinkRelatedrecords Module = 'Campaigns', RecordId = '4482327000000467001', RelatedModule = 'Leads', RelatedRecordsAggregate = 'LinkRelatedrecords#TEMP';
You can also supply record identifiers and member statuses directly as a JSON aggregate to the RelatedRecordsAggregate parameter.
EXEC LinkRelatedrecords Module = 'Campaigns', RecordId = '4482327000000467001', RelatedModule = 'Leads', RelatedRecordsAggregate = '[{\"id\": \"984075000000575003\", \"Member_Status\": \"Active\"}, {\"id\": \"984075000000574037\", \"Member_Status\": \"Active\"}]';
Input
| Name | Type | Description |
| Module | String | The name of the supported module where the relationship is created. |
| RelatedModule | String | The name of the related module to be linked. |
| RecordId | String | The unique identifier of the record in the primary module. |
| RelatedRecordsAggregate | String | An array containing one or more related record relationships to update. |
Result Set Columns
| Name | Type | Description |
| Status | String | Indicates whether the operation was successful. |
| RelatedRecordId | String | The identifier of the record which was added as a relation. |
| Message | String | The message from the Zoho CRM API indicating if the record was added as a relation. |