Answer the question
In order to leave comments, you need to log in
How to update a custom field in an order?
Tell me how to update the custom property in the order parameters block through the rest api
As far as I understand, it should work like this, but it does not work. help me please
require_once (__DIR__.'/crest.php');
$result = CRest::call(
'sale.order.update',
[
'id' => '203',
'fields' => [
'UF_CRM_1636633709' => 'test',
'comments' => 'testov',
]
]
$result = CRest::call(
'sale.order.add',
[
'fields' => [
'UF_CRM_1636633709' => '203',
'userId' => '1',
'personTypeId' => '1',
'currency' => 'rb',
'lid' => 's1',
]
]
);
Answer the question
In order to leave comments, you need to log in
I don't think it's possible.
On the backend of the order, UF_* fields are not architecturally used, the store has its own historical heritage. When added to CRM, these fields appear to be on the side, so they are not part of the store itself and you cannot set them using this method.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question