Update Timeline Entry rpa.comment.update

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

Scope: rpa

Who can execute the method: any user

DEPRECATED

The development of this method has been halted. Please use Smart scripts as an alternative to this functionality.

This method updates the timeline entry with the identifier id. It only updates the title and description fields.

The method allows changes only to comments that were added by the same user.

Method Parameters

Name
type

Description

id
integer

Identifier of the comment

fields
object

An object describing the fields of the comment

Fields Parameter

Name
type

Description

description
integer

Description of the entry. HTML and BB-code formatting can be used

files
integer

An array of attached files. Each element is an array containing the name and content encoded in base64.

To add a new file, you must provide a list where the key id corresponds to the identifier of the file attached to this comment.

For uploading new files, you also need to provide an array with the name and content of the file in base64.

Code Examples

How to Use Examples in Documentation

try
        {
        	const response = await $b24.callMethod(
        		'rpa.comment.add',
        		{
        			"typeId": 24,
        			"itemId": 10,
        			"fields": {
        				"description": "Mention of user with id 1",
        				"files": [
        					{
        						"id": 15 // identifier of the old file
        					},
        					[
        						"another_document.pdf", "...base64_decoded_content..."
        					]
        				]
        			}
        		}
        	);
        	
        	const result = response.getData().result;
        	console.log('response', result.answer);
        	if(result.error())
        		alert("Error: " + result.error());
        	else
        		console.log(result);
        }
        catch( error )
        {
        	console.error('Error:', error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'rpa.comment.add',
                    [
                        'typeId' => 24,
                        'itemId' => 10,
                        'fields' => [
                            'description' => 'Mention of user with id 1',
                            'files'      => [
                                [
                                    'id' => 15 // identifier of the old file
                                ],
                                [
                                    'another_document.pdf', '...base64_decoded_content...'
                                ]
                            ]
                        ]
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Success: ' . print_r($result, true);
            echo 'response: ' . $result['answer'];
            if ($result['error']) {
                echo 'Error: ' . $result['error'];
            } else {
                echo 'Data: ' . print_r($result['data'], true);
            }
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error adding comment: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'rpa.comment.add',
            {
                "typeId": 24,
                "itemId": 10,
                "fields": {
                    "description": "Mention of user with id 1",
                    "files": [
                        {
                            "id": 15 // identifier of the old file
                        },
                        [
                            "another_document.pdf", "...base64_decoded_content..."
                        ]
                    ]
                }
            },
            function(result) {
                console.log('response', result.answer);
                if(result.error())
                    alert("Error: " + result.error());
                else
                console.log(result.data());
            }
        )
        

Continue Learning