Answer the question
In order to leave comments, you need to log in
How to write a value to the custom field "megaplan" when creating a deal via api?
Hello!
Please tell me how I can record, among other things, the value of the custom field in the transaction.
There is a field with this id (Category1000055CustomFieldRoistat)
[32] => Array
(
[Name] => Category1000055CustomFieldRoistat
[Translation] => roistat
)
function create_deal($client, $desc) {
global $request;
$raw = $request->get(
'/BumsTradeApiV01/Deal/save.api', array(
'ProgramId' => 3,
'StatusId' => 2,
'StrictLogic' => false,
'Model[Auditors]' => '1000008',
'Model[Contractor]' => (int) $client,
'Model[Contractor]' => (int) $client,
'Model[Description]' => $desc
)
);
return json_decode($raw, true);
}
...
'Model[Description]' => $desc,
"Model[Category1000055CustomFieldRoistat]" => $roistat
"Category1000055CustomFieldRoistat" => $roistat,
"CustomFieldRoistat" => $roistat,
"Roistat" => $roistat,
"roistat" => $roistat,
"fields" => array(
"Category1000055CustomFieldRoistat" => $roistat,
)
)
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question