Opportunity status/stagename enum のすべての可能な値を取得するための API 呼び出しはありますか?
1404 次
1 に答える
4
これを REST 経由で実行するコードを次に示します。これは、SOAP にもほぼ直接変換されるはずです。
$parameters = array(
'session' => $sessionId,
'module_name' => 'Opportunities',
);
$json = json_encode($parameters);
$postArgs = array(
'method' => 'get_module_fields',
'input_type' => 'JSON',
'response_type' => 'JSON',
'rest_data' => $json
);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postArgs);
// Make the REST call, returning the result
$response = curl_exec($curl);
if (!$response) {
die("Connection Failure.\n");
}
// Convert the result from JSON format to a PHP array
$result = json_decode($response);
if ( !is_object($result) ) {
die("Error handling result.\n");
}
if ( !isset($result->module_name) ) {
die("Error: {$result->name} - {$result->description}\n.");
}
var_dump($result->module_fields->sales_stage->options);
exit;
于 2012-11-15T16:07:41.210 に答える