Get a set of contacts associated with a deal crm.deal.contact.items.get

We are still updating this page

Some data may be missing — we will complete it shortly.

Scope: crm

Who can execute the method: any user

The method crm.deal.contact.items.get returns a set of contacts associated with the specified deal.

Parameter

Description

id*

Identifier of the deal.

Required parameters are marked with *

Example

try
        {
        	const id = prompt("Enter ID");
        	const response = await $b24.callMethod(
        		"crm.deal.contact.items.get",
        		{
        			id: id
        		}
        	);
        	
        	const result = response.getData().result;
        	console.dir(result);
        }
        catch(error)
        {
        	console.error(error);
        }
        
try {
            $dealId = 123; // Replace with the actual deal ID
            $result = $serviceBuilder
                ->getCRMScope()
                ->dealContact()
                ->itemsGet($dealId);
        
            foreach ($result->getDealContacts() as $item) {
                print("CONTACT_ID: " . $item->CONTACT_ID . "\n");
                print("SORT: " . $item->SORT . "\n");
                print("ROLE_ID: " . $item->ROLE_ID . "\n");
                print("IS_PRIMARY: " . $item->IS_PRIMARY . "\n");
            }
        } catch (Throwable $e) {
            print("Error: " . $e->getMessage());
        }
        
var id = prompt("Enter ID");
        BX24.callMethod(
            "crm.deal.contact.items.get",
            {
                id: id
            },
            function(result)
            {
                if(result.error())
                    console.error(result.error());
                else
                    console.dir(result.data());
            }
        );
        

How to Use Examples in Documentation

Response in case of success

The result is returned as an array of objects, each containing the following fields:

Field

Description

CONTACT_ID

Identifier of the contact

SORT

Sort index

ROLE_ID

Identifier of the role (reserved)

IS_PRIMARY

Flag for primary contact