---
schema_version: "1"
id: 44cb11547aa5be134f0e55404344d113887da730ede1350907307af75819f393
title: cgcloud__Account_Relationship__c
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/sforce_api_objects_cgcloud__account_relationship__c.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/sforce_api_objects_cgcloud__account_relationship__c.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9b9e79efbaf5ff04942434ae506018f16a3bd2f441df78838e676f1cce32fd82
description: This object represents the relationship between two customer accounts. This object is available in API version 54.0 and later.
---
# cgcloud\_\_Account\_Relationship\_\_c

This object represents the relationship between two customer accounts. This object is available in API version 54.0 and later.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

## Fields

### LastActivityDate

- **Type**: date
- **Properties**: Filter, Group, Nillable, Sort
- **Description**: Most recent date on which a user performed an activity on this record.

### Name

- **Type**: string
- **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort
- **Description**: Name of this record.

### cgcloud\_\_Account\_\_c

- **Type**: reference
- **Properties**: Create, Filter, Group, Sort
- **Description**: Specifies the main customer in the relationship.
    
    This is a relationship field.
- **Relationship Name**: cgcloud\_\_Account\_\_r
- **Relationship Type**: Master-detail
- **Refers To**: Account (Master object)

### cgcloud\_\_End\_Date\_\_c

- **Type**: date
- **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
- **Description**: Date until which the relationship is active.

### cgcloud\_\_Is\_Primary\_Relationship\_\_c

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether the relationship is a primary relationship (true) or not (false).
- **Default value**: false

### cgcloud\_\_Record\_Link\_\_c

- **Type**: string
- **Properties**: Filter, Nillable, Sort
- **Description**: Link to the detail page of the Customer Relationship record.
    
    This is a calculated field.
- **Formula**:
    
    HYPERLINK("/" &Id, $Label.cgcloud\_\_record\_link, "\_top")

### cgcloud\_\_Related\_Account\_Name\_\_c

- **Type**: string
- **Properties**: Filter, Nillable, Sort
- **Description**: Name of the customer who is related to the main customer of the relationship.
    
    This field is a calculated field.
    
    This field is available in API version 55.0 and later.
- **Formula**:
    
    cgcloud\_\_Related\_Account\_\_r.Name

### cgcloud\_\_Related\_Account\_\_c

- **Type**: reference
- **Properties**: Create, Filter, Group, Sort, Update
- **Description**: Customer who is related to the main customer in the relationship.
    
    This is a relationship field.
- **Relationship Name**: cgcloud\_\_Related\_Account\_\_r
- **Relationship Type**: Lookup
- **Refers To**: Account

### cgcloud\_\_Relationship\_Type\_\_c

- **Type**: picklist
- **Properties**: Create, Filter, Group, Sort, Update
- **Description**: Defines the relationship that's defined by this account-to-account relation record (Payer, Payee, Wholesaler, Delivery Recipient, Bill To, and so on.).
- **Possible values**:
    - BillTo
    - DeliveryRecipient
    - Payee
    - Payer
    - Wholesaler

### cgcloud\_\_Self\_Relationship\_\_c

- **Type**: boolean
- **Properties**: Defaulted on create, Filter, Group, Sort
- **Description**: Formula that’s used to indicate that the relationship is a self relationship.
    
    This is a calculated field.
- **Formula**:
    
    cgcloud\_\_Account\_\_c = cgcloud\_\_Related\_Account\_\_c

### cgcloud\_\_Start\_Date\_\_c

- **Type**: date
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Date from which the relationship is active.

## Associated Objects

### Associated Objects

This object has these associated objects. If the API version isn’t specified, they are available in the same API versions as this object. Otherwise, they are available in the specified API version and later.

- **[cgcloud\_\_Account\_Relationship\_\_cChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/sforce_api_associated_objects_change_event.htm "A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.")**: Change events are available for the object.
- **[cgcloud\_\_Account\_Relationship\_\_cFeed](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/sforce_api_associated_objects_feed.htm "StandardObjectNameFeed is the model for all feed objects associated with standard objects. These objects represent the posts and feed-tracked changes of a standard object.")**: Feed tracking is available for the object.
- **[cgcloud\_\_Account\_Relationship\_\_cHistory](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/sforce_api_associated_objects_history.htm "StandardObjectNameHistory is the model for all history objects associated with standard objects. These objects represent the history of changes to the values in the fields of a standard object.")**: History is available for the tracked fields of the object.
- **[cgcloud\_\_Account\_Relationship\_\_cOwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/sforce_api_associated_objects_ownersharingrule.htm "StandardObjectNameOwnerSharingRule is the model for all owner sharing rule objects associated with standard objects. These objects represent a rule for sharing a standard object with users other than the owner.")**: Sharing rules are available for the object.
- **[cgcloud\_\_Account\_Relationship\_\_cShare](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/sforce_api_associated_objects_share.htm "StandardObjectNameShare is the model for all share objects associated with standard objects. These objects represent a sharing entry on the standard object.")**: Sharing is available for the object.