Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using list methods where result is not an array #24

Open
felipealmeida opened this issue Jan 26, 2022 · 1 comment
Open

Using list methods where result is not an array #24

felipealmeida opened this issue Jan 26, 2022 · 1 comment

Comments

@felipealmeida
Copy link

Hello,

I'm trying to use the crm.stagehistory.list method the following way:

bitrix.list('crm.stagehistory.list' as any, { entityTypeId: 2 } as any)
    .then((payload) => 
          {
              console.log(payload);
          });

However, if you try that you will see that it fails on batchToListPayload because it assumes result is iterable, however, result in this call is an object and items inside that is an array.

Maybe there could be a way to specify how to batch, or at least a way to pass a different batchToListPayload?

Kind regards,

@mrhyde
Copy link
Member

mrhyde commented Jan 27, 2022

Hi @felipealmeida,
I'll try to take a look at the mentioned issue but can't promise a fast resolution due to the fact that this project is not under active development at the moment. But in case you are willing to support the common cause and provide a PR that would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants