quickbooks - 为什么公司文件名由 Web 服务提供?

标签 quickbooks qbwc

据我了解,要访问当前未在 QuickBooks 中打开的公司,Web 服务需要向 QuickBooks Web Connector 提供文件位置,作为 authenticate() 调用的返回值。

这对我来说似乎是倒退的。为什么 Web 服务要负责告诉 Web Connector 相关公司文件的位置?由 Web 连接器管理不是更有意义吗?

这是我在 QuickBooks Web Connector 中找到的相关解释 程序员指南:

  1. IF your web service wants to try a different company, supply the company pathname in the returned string. (You can supply an empty string if you want to use whatever company file happens to be open.) The web connector will respond by attempting to connect to QuickBooks again using that supplied string.

Why Would a Web Service Try a Different Company?

Why would a web service perform the second of these actions instead of simply just stopping altogether? In practice this approach is used when the web service remembers the company file path from session to session (a recommended practice) and wants to have a fall-back to use whatever company file is currently open in QuickBooks (by responding to the connectionError call with an empty string).

This is not as haphazard as it might seem. When a web service is added to the web connector, the web connector stores a unique FileID as a private data extension in the specified company. As a result, the web service can always verify that it is talking to the expected company file simply by checking the CompanyRet returned to your web service in the web connector’s first sendRequestXML call in the data exchange sequence. (Check the data extension list for the expected FileID.)

这似乎是一种糟糕的最终用户体验;如果他们移动公司文件(假设他们希望 Web 连接器在不打开 QuickBooks 的情况下运行),则 Web 服务将失败,直到在服务器端更新该路径。最终用户可以在不知道这样做会破坏东西的情况下执行此操作,这似乎是完全合理的。

为什么是这样的结构?更重要的是:有办法解决这个问题吗?

最佳答案

Why is it structured this way?

因为这就是 Intuit 构建它的方式。

is there a way around this?

没有。

关于quickbooks - 为什么公司文件名由 Web 服务提供?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32567893/

相关文章:

java - 如何使用 QuickBooks Online Java SDK 创建发票实体

QuickBooks Web 连接器 TimeModified 偏移量不考虑夏令时

quickbooks - 缺少 QBWC WSDL

c# - 如何将 quickbook 桌面应用程序与网站集成

QuickBooks API - 检索所有帐户的交易

php - 在 PHP 中创建 Quickbook 发票时如何在 "Class"中插入值?

quickbooks - 如何为 QuickBooks Web 连接器创建 .qwc 文件?

api - Quick Books API playground - 开发应用只能订阅沙盒公司

quickbooks - 如何使用 QBXML 将行项目添加到现有销售订单