开发者

Edit a blank invoice line in QuickBooks SDK

I am writing a small utility to modify invoice line items in QuickBooks using the SDK. Everything is working well until开发者_如何学运维 I hit a blank line in the invoice or a line that only has a description used for spacing/separating line items. It will continue to process the request, but it will not recreate the line in the invoice, it's as if it's deleting the line. There is nothing in the documentation that I see outside of the documented required fields that would cause this behavior.

I am using the IORInvoiceLineMod interface implementation. It seems that only this special case is causing the problems.


Okay, so I figured it out. I read the manual (Programmer's Guide) that comes with the SDK, Chapter 7 on modifying line items in lists in QuickBooks. When editing a line that you don't want to modify (i.e. blank line), only specify the TxnLineId and nothing else. The SDK will copy over whatever was there before, including blank elements.

In my case, I was looking for nulls and then skipping the item outright, which the QuickBooks SDK interprets as "please delete this line item." Once I fixed the logic in my code, the blank line items remained. RTFM wins again!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜