douzhi3776 2014-10-18 08:32
浏览 28
已采纳

Php Quickbooks Customer_Mod

I am working on Quickbooks web connector and Customer Add works very well. Now I want to modify my customer and here is my xml.

<QBXML>
 <QBXMLMsgsRq onError="stopOnError">
<CustomerModRq requestID="'.$requestID.'">
  <CustomerMod>
    <ListID>ConsoliBYTE, LLC (13912179)</ListID>
    <EditSequence>1365684445</EditSequence>

    <Name>Test Customer UPDATED</Name>

  </CustomerMod>
</CustomerModRq>
</QBXMLMsgsRq>
</QBXML>

The logged error is 3000: The given object ID "ConsoliBYTE, LLC (13912179)" in the field "list id" is invalid.

What is the list id and how do i get it?

  • 写回答

2条回答 默认 最新

  • dp13668681869 2014-10-18 11:35
    关注

    A <ListID> is an internal identifier (e.g. primary key) used by QuickBooks to identify a record.

    An <EditSequence> is a value which indicates when the last change was made to the record. Every time the record is updated (regardless of whether this happens through the UI, or API/SDK), the EditSequence value changes. To update a record, you must provide the very latest EditSequence value.

    The value you provided for ListID is definitely not correct. You provided a customer name, not a ListID.

    Whenever you add or query for a customer, the ListID value and the EditSequence value will will be returned.

    To do an update, you should query for the customer first (to get the latest EditSequence value from QuickBooks) and then do your CustomerMod request using those latest values.

    If you're using this open-source QuickBooks PHP DevKit:

    Then you should have request/response functions written to query for customers and update customers. Queue up a QUICKBOOKS_QUERY_CUSTOMER and when you get back the response, queue up your QUICKBOOKS_MOD_CUSTOMER request then, either storing the ListID and EditSequence in $extra or in your own database somewhere.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 有没有帮写代码做实验仿真的
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥30 vmware exsi重置后登不上
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
  • ¥20 yolov5自定义Prune报错,如何解决?
  • ¥15 电磁场的matlab仿真