Created
May 23, 2020 15:10
-
-
Save BedrosovaYulia/363dde979e646f055bb8d36fc4a1256a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$ct=new CCrmContact(false); | |
$arParams = array('HAS_PHONE'=>'Y'); | |
$arParams['FM']['PHONE'] = array( | |
'n0' => array( | |
'VALUE_TYPE' => 'WORK', | |
'VALUE' => '12345678', | |
) | |
); | |
$arParams['FM']['EMAIL'] = array( | |
'n0' => array( | |
'VALUE_TYPE' => 'WORK', | |
'VALUE' => '[email protected]', | |
) | |
); | |
$arParams['FULL_NAME']="Иванов Иван Иванович"; | |
$arParams['LAST_NAME']="Иванов"; | |
$arParams['HAS_EMAIL']='Y'; | |
$arParams['HAS_PHONE']='Y'; | |
$arParams['COMPANY_ID']=748; | |
$arParams['TYPE_ID'] ='CLIENT'; | |
$arParams['SOURCE_ID']= 'WEB'; | |
$arParams['OPENED'] = 'Y'; | |
$new_contact_id=$ct->Add($arParams, true, array('DISABLE_USER_FIELD_CHECK' => true)); | |
if ($new_contact_id){ | |
print $new_contact_id."<br/>"; | |
} | |
else{ | |
print $ct->LAST_ERROR; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment