Answer the question
In order to leave comments, you need to log in
How to pass a link to the deal field without overwriting previous links using the crm.deal.update method?
Hello, please tell me, if I pass a link in the deal field using the crm.deal.update rest method, how to make sure that each new link is added to the additional field of the field to which I transfer, and does not replace all added links in additional fields ?
The field type is "link", within this field you can create additional fields, they do not have their own identifiers. If you request information about the deal via rest, then additional fields and their contents will be displayed like this:
UF_CRM_1594993829087] => Array (
[0] => vapvapr
[1] => yvapyvap
[2] => 5pkevyap
)
When forming the fields parameter array for the crm.deal.update method, I can specify that the next link will be with the "3" key in the parameter array:
$DEAL_URL[3] = $URL_COMPLETE;
$DEAL_FIELD[UF_CRM_1594993829087] = $DEAL_URL;
But this link will still overwrite and destroy everything contained in the additional fields.
Answer the question
In order to leave comments, you need to log in
1. Make the field multiple
2. Add a value to the array:
$DEAL_FIELD['UF_CRM_1594993829087'][] = $DEAL_URL;
But this link will still overwrite and destroy everything contained in the additional fields.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question