Closed ryanhonea-horne closed 5 months ago
@ryanhonea-horne To get more than 1000 records, you can utilize the get_all_generator method of the base class. Here are some changes that would be required:
Since we can't use '*' without read_by_query, you'll need to pass the fields you want in the response such as ['RECORDNO', 'PRBATCHKEY', 'RECORDTYPE', 'RECORDID', 'FINANCIALENTITY'....].
You can use the generator method as follows, it has a default page size of 2000.
list_of_data = ['RECORDNO', 'PRBATCHKEY', 'RECORDTYPE', 'RECORDID', 'FINANCIALENTITY']
response = sdk_connection.ap_payments.get_all_generator(fields=list_of_data)
We have stored the default set of fields in https://github.com/fylein/sageintacct-sdk-py/blob/master/sageintacctsdk/apis/constants.py You can add the APPYMT related fields in this file and use the get_all_generator method without the need of passing any args.
We're open to contributions as well and would love it if you could consider contributing to our SDK, Thanks!
Closing this issue, please re-open if you have any question/issue.
Current implementation of the get_all method in Appayments is using a legacy function that is significantly limited compared to get_all function in api_base. Currently can't return more than 1000 without doing a custom request.