【问题标题】:IPP Find All Accounts - Best PracticeIPP 查找所有帐户 - 最佳实践
【发布时间】:2013-05-18 19:44:19
【问题描述】:

我正在尝试提取 QuickBooks Online 帐户的所有帐户。我的用户有 350 多个帐户可供提取。有没有办法一次把它们全部拉出来?如果没有,有没有办法确定要拉多少条记录,然后将它们拉到一个组中?这是我的代码:

//pull a list of all accounts. I can only pull 100 at a time, so I need to keep enumerating until I hit 0
        Account acct = new Account();
        _accounts = new List<Account>();
        for (int i = 1; i < 4; i++)
        {
            var aList = dataServices.FindAll(acct, i, 100);
            if (aList.Count() == 0)
            {
                break;
            }
            _accounts.AddRange(aList);
        }

我猜我的客户的帐户不超过 300 个。有没有办法可以替换 3 或更高效的代码?

【问题讨论】:

    标签: intuit-partner-platform quickbooks-online


    【解决方案1】:

    在 QBO 中,分页是获取所有帐户的唯一选项。

    在 QBD 中,您可以使用 rest api.PFB 链接获取计数。 https://developer.intuit.com/docs/0025_intuit_anywhere/0050_data_services/v2/0500_quickbooks_windows/0100_calling_data_services/0015_retrieving_objects#Getting_a_Record_Count

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-28
      • 2014-10-02
      • 1970-01-01
      • 2011-04-06
      • 2012-06-07
      • 2016-06-17
      • 2018-03-31
      • 1970-01-01
      相关资源
      最近更新 更多