Get the BX24.proxy Function

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.

The BX24.proxy method creates a proxy function for calling func in the context of thisObject. This method is similar to BX.proxy. When called again with the same func and thisObject, it returns the same proxy function.

Function BX24.proxy(Function func, Object thisObject)
        

Parameters

Required parameters are marked with *

Name
type

Description

func*
function

The original function for which the proxy is created

thisObject*
object

The object that will be used as this when calling func

Code Example

How to Use Examples in Documentation

BX24.init(function () {
            const context = {
                value: 10,
                print: function (step) {
                    console.log(this.value + step);
                }
            };
        
            const proxy = BX24.proxy(context.print, context);
            proxy(5); // 15
        });
        

Response Handling

The method synchronously returns a result of type function.

Returned Data

Name
type

Description

result
function

Proxy function for calling func in the context of thisObject

Continue Learning