R
R
Rebus2022-04-20 12:55:11
1C-Bitrix
Rebus, 2022-04-20 12:55:11

Outputting more than 50 elements to Bitrix, how to display one object, not two?

Hello, tell me how to make the output of one object with 57 elements, and not first 50 and then another rest of 7. It is
necessary to overwrite, and not overwrite each time using map

625fd82006962609857466.png

getField() {
      BX24.callMethod('entity.item.get', {
            ENTITY: 'wheelfortune', SORT: {'ID': 'ASC'}
          },
          (result) => {
            let sections = result.data();

            this.fields = sections.map((field) => ({
              ID: field.ID,
              NAME: field.NAME,
              SECTION: field.SECTION,
              'IS_EDITFIELD': false
            }))
            console.log(this.fields);
            if (result.more()) {
              result.next();
            }
          });
    },

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rebus, 2022-04-20
@roman_vo

based on WapSter 's answer , did this

getField() {
      BX24.callMethod('entity.item.get', {
            ENTITY: 'wheelfortune', SORT: {'ID': 'ASC'}
          },
          (result) => {
            let sections = result.data();
            let newSections = sections.map((field) => ({
              ID: field.ID,
              NAME: field.NAME,
              SECTION: field.SECTION,
              'IS_EDITFIELD': false
            }))
            this.fields = newSections.concat(this.fields);
            if (result.more()) {
              result.next();
            }
          });
    },

W
WapSter, 2022-04-20
@wapster92

getField() {
      BX24.callMethod('entity.item.get', {
            ENTITY: 'wheelfortune', SORT: {'ID': 'ASC'}
          },
          (result) => {
            let sections = result.data();

            const newSections = sections.map((field) => ({
              ID: field.ID,
              NAME: field.NAME,
              SECTION: field.SECTION,
              'IS_EDITFIELD': false
            }))
            this.fields.join(...newSections)
            console.log(this.fields);
            if (result.more()) {
              result.next();
            }
          });
    },

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question