$prms = array(
"id" => $idLead,
"fields" => array(
"UF_CRM_1622919648" => 1,
),
);
$prms = json_encode( $prms );
$result = bx24( $prms, 'crm.lead.update' );
function bx24( $params, $type, $portal = '*', $admin_id = '*', $secret_code = '*' ) {
$queryUrl = 'https://' . $portal . '.bitrix24.ru/rest/' . $admin_id . '/' . $secret_code . '/' . $type;
$params = json_decode( $params, true );
$queryData = http_build_query(
$params
);
$curl = curl_init();
curl_setopt_array( $curl, array(
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_POST => 1,
CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $queryUrl,
CURLOPT_POSTFIELDS => $queryData,
) );
$result = curl_exec( $curl );
curl_close( $curl );
}
PHP, HTML и CSS
$prms = array(
"id" => id_deal,
"fields" => array(
"id_field" => 'value',
),
);
$prms = json_encode( $prms );
$result = bx24( $prms, 'crm.deal.update' );
function bx24( $params, $type, $portal = '***', $admin_id = '***', $secret_code = '****' ) {
$queryUrl = 'https://' . $portal . '.bitrix24.ru/rest/' . $admin_id . '/' . $secret_code . '/' . $type;
$params = json_decode( $params, true );
$queryData = http_build_query(
$params
);
$curl = curl_init();
curl_setopt_array( $curl, array(
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_POST => 1,
CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $queryUrl,
CURLOPT_POSTFIELDS => $queryData,
) );
$result = curl_exec( $curl );
curl_close( $curl );
return json_decode( $result, 1 );
}
?>
{{=dateadd({=System:Date},"1d10h")}}
Синтаксис: =addworkdays([дата, к которой будут добавляться дни], [количество добавляемых рабочих дней])