Answer the question
In order to leave comments, you need to log in
How to add a line break to a comment when generating a lead using Bitrix 24 rest api?
I generate a lead from the site when filling out the form, in the "comment" field I add a hyphen - "\n", but in the generated lead the comment is created without a line break,
what could be the problem?
Answer the question
In order to leave comments, you need to log in
I am writing for future questioners.
In different parts of the system, different ways of line wrapping work.
One of the following options will definitely help:
Thanks to.
And also (judging by the description https://dev.1c-bitrix.ru/rest_help/im/im_notify.php ) there is an option to translate the line #BR#
I work with Bitrix24 through 1C Rest API. In a multiline field in Bitrix, it was not possible to make a line break in any way. The symbol %0A helped .
Here is an example
RecordJson_ = New RecordJSON;
RecordJson_.SetString(NewJSONRecordParameters(,Characters.Tab,,JSONCharacterEscape.None,,,,,False));
WriteJson_.WriteStartObject();
.....
WriteJson_.WritePropertyName("cmd14");
WriteJson_.WriteValue("crm.timeline.comment.add?fields[ENTITY_ID]=6439"+
"&fields[ENTITY_TYPE]=deal&fields[COMMENT]=aaa "+ "%0A" +" bbb");
The result is a multi-line string :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question