Get the list of custom blocks landing.repo.getList

We are still updating this page

Some data may be missing — we will complete it shortly.

Scope: landing

Who can execute the method: any user

The method landing.repo.getList retrieves a list of blocks from the current application.

Parameters

Parameter

Description

Available from

params
unknown

Optional array with optional keys:

  • select,
  • filter,
  • order,
  • group,

which contain values from the main fields table of the entity. The table is provided below.

Fields

Field

Description

ID
unknown

Record identifier

XML_ID
unknown

Unique record code.

APP_CODE
unknown

Code of the current application.

ACTIVE
unknown

Activity status (Y / N).

NAME
unknown

Title.

DESCRIPTION
unknown

Description.

SECTIONS
unknown

Symbolic codes of categories.

PREVIEW
unknown

Preview image.

MANIFEST
unknown

Manifest.

CONTENT
unknown

Content.

CREATED_BY_ID
unknown

Identifier of the user who created the record.

MODIFIED_BY_ID
unknown

Identifier of the user who modified the record.

DATE_CREATE
unknown

Creation date.

DATE_MODIFY
unknown

Modification date.

Examples

// callListMethod: Retrieves all data at once. Use only for small selections (< 1000 items) due to high memory usage.
        
        try {
          const response = await $b24.callListMethod(
            'landing.repo.getList',
            {
              params: {
                select: [
                  'ID', 'NAME', 'MANIFEST'
                ],
                filter: {
                  '>ID': '1'
                }
              }
            },
            (progress) => { console.log('Progress:', progress) }
          )
          const items = response.getData() || []
          for (const entity of items) { console.log('Entity:', entity) }
        } catch (error) {
          console.error('Request failed', error)
        }
        
        // fetchListMethod: Retrieves data in parts using an iterator. Use it for large data volumes to optimize memory usage.
        
        try {
          const generator = $b24.fetchListMethod('landing.repo.getList', {
            params: {
              select: [
                'ID', 'NAME', 'MANIFEST'
              ],
              filter: {
                '>ID': '1'
              }
            }
          }, 'ID')
          for await (const page of generator) {
            for (const entity of page) { console.log('Entity:', entity) }
          }
        } catch (error) {
          console.error('Request failed', error)
        }
        
        // callMethod: Manually controls pagination through the start parameter. Use it for precise control of request batches. For large datasets, it is less efficient than fetchListMethod.
        
        try {
          const response = await $b24.callMethod('landing.repo.getList', {
            params: {
              select: [
                'ID', 'NAME', 'MANIFEST'
              ],
              filter: {
                '>ID': '1'
              }
            }
          }, 0)
          const result = response.getData().result || []
          for (const entity of result) { console.log('Entity:', entity) }
        } catch (error) {
          console.error('Request failed', error)
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'landing.repo.getList',
                    [
                        'params' => [
                            'select' => [
                                'ID', 'NAME', 'MANIFEST'
                            ],
                            'filter' => [
                                '>ID' => '1'
                            ]
                        ]
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            if ($result->error()) {
                error_log($result->error());
            } else {
                echo 'Success: ' . print_r($result->data(), true);
            }
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error getting landing repository list: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'landing.repo.getList',
            {
                params: {
                    select: [
                        'ID', 'NAME', 'MANIFEST'
                    ],
                    filter: {
                        '>ID': '1'
                    }
                }
            },
            function(result)
            {
                if(result.error())
                    console.error(result.error());
                else
                    console.info(result.data());
            }
        );
        

How to Use Examples in Documentation