Answer the question
In order to leave comments, you need to log in
How to correctly specify the filter "by occurrence" in the Bitrix code?
In a method that returns a list of objects, what is the correct way to write filter to return results containing $lot_number?
An example of a code where everything works, but works according to the strict correspondence of the contents of the UF_CRM_1580557568 field to the $lot_number variable
Code:
$result = CRest::call(
'crm.deal.list',
[
'order' => ['STAGE_ID' => 'ASC'],
'filter' => ['UF_CRM_1580557568' => $lot_number],
'select' => ["UF_*", "*"]
]);
Answer the question
In order to leave comments, you need to log in
You have a piece of when to work with the Rest API when accessing deals, and the documentation is from working with infoblocks. It's like a little bit completely different things.
For rest, as far as I know, there is no substring search, only >,<,<=,>=
So for your case it's not possible to do this.
It worked for me like this
$id=118;
$filter_id = CRest::call('crm.contact.list',['filter' => ['UF_CRM_60EEBF612D269' => $id ]] );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question