我正在尝试使用 Acumatica Web 服务 API 为客户导出所有位置。我希望使用 Locations 屏幕我可以在 Customer ID 字段上设置一个过滤器,我认为它是 LocationSummary.Customer,这将返回该客户的所有 Locations。相反,我总是返回 0 个结果。代码如下,我还展示了 ID 为 012349 的测试客户存在的位置的屏幕截图,调试器结果显示返回 0 条记录。
Public Function GetAddressList(ByVal customerID As String) As String()()
Dim address As CR303010Content = m_context.CR303010GetSchema()
m_context.CR303010Clear()
Dim customerFilter As Filter = New Filter()
customerFilter.Field = address.LocationSummary.Customer
customerFilter.Condition = FilterCondition.Equals
customerFilter.Value = customerID
Dim searchfilters() As Filter = {customerFilter}
Dim searchCommands() As Command = {address.LocationSummary.Customer, address.LocationSummary.LocationID, address.GeneralInfoLocationAddress.AddressLine1, address.GeneralInfoLocationAddress.City}
Dim searchResult As String()() = m_context.CR303010Export(searchCommands, searchfilters, 0, False, False)
Return searchResult
End Function
调试器显示长度为 0 的 searchResult 数组