Skip to content

Commit 2965f6b

Browse files
committed
Modified update contact and deal
Modified few changes related to deal and contact
1 parent 51b4176 commit 2965f6b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

PHP_API_v2.0.0.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,4 +280,31 @@ function curl_wrap($entity, $data, $method)
280280
/*================================================= update deal end================================================*/
281281
echo "</ul>";
282282
echo "</body></html>";
283+
284+
// To set contacts system and custom data
285+
function setContactField($name, $value,$result){
286+
$name = $name;
287+
$value = $value;
288+
$properties = $result->properties;
289+
foreach ($properties as $propertie) {
290+
//echo "$propertie->name <br>";
291+
if (strcasecmp($name, $propertie->name) == 0) {
292+
echo "$propertie->value";
293+
$propertie->value=$value;
294+
}
295+
}
296+
}
297+
// To set deals custom data
298+
function setDealCustom($name, $value,$result){
299+
$name = $name;
300+
$value = $value;
301+
$custom_data = $result->custom_data;
302+
foreach ($custom_data as $custom_data1) {
303+
//echo "$propertie->name <br>";
304+
if (strcasecmp($name, $custom_data1->name) == 0) {
305+
echo "$custom_data1->value";
306+
$custom_data1->value=$value;
307+
}
308+
}
309+
}
283310
?>

0 commit comments

Comments
 (0)