+ Start a Discussion
RAM AnisettiRAM Anisetti 

How to call setDuplicateRuleHeader from API(using PHP)


Can any one guide me how to call setDuplicateRuleHeader from PHP using Force.com-Toolkit-for-PHP-master 20.0.I didnt find any method related DuplicateRuleHeader in PHP Tool kit.just i find java sample code in salesforce SOAP guide attached below.i need use similar functionality in php to know how many duplicate leads are there in Salesforce org.

Thanks in Advance
User-added image

salesforce mesalesforce me
Hi check this once..
// Method: POST, PUT, GET etc
// Data: array("param" => "value") ==> index.php?param=value

function CallAPI($method, $url, $data = false)
    $curl = curl_init();

    switch ($method)
        case "POST":
            curl_setopt($curl, CURLOPT_POST, 1);

            if ($data)
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
        case "PUT":
            curl_setopt($curl, CURLOPT_PUT, 1);
            if ($data)
                $url = sprintf("%s?%s", $url, http_build_query($data));

    // Optional Authentication:
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "username:password");

    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

    $result = curl_exec($curl);


    return $result;

RAM AnisettiRAM Anisetti
Thanks salesforce,

You didnt get exact requirement..The above answer will not help me.