mercredi 22 avril 2015

QuickBooksOnline SDK updates all fiels instead of one

I use intuit.ipp sdk to update inventory in quickbooks acocunt. I want update one field qty on hand, but after update item's 'price','cost','Description on sales forms','Description on purchase forms' are 0 or empty string. Why quick books online updates them? My Code:

                batch.Add( new Item()
                {
                    Name = item.Sku,
                    Id = item.Id,
                    SyncToken = item.SyncToken,
                    QtyOnHand = item.QtyOnHand,
                    QtyOnHandSpecified = true,
                    UnitPriceSpecified = false,
                    PurchaseCostSpecified = false,
                    AvgCostSpecified = false,
                    ExpenseAccountRef = new ReferenceType { Value = item.ExpenseAccRefValue, name = item.ExpenseAccRefName, type = item.ExpenseAccRefType },
                    IncomeAccountRef = new ReferenceType { Value = item.IncomeAccRefValue, name = item.IncomeAccRefName, type = item.IncomeAccRefType }
                }, item.Id, OperationEnum.update );

            batch.Execute();

Aucun commentaire:

Enregistrer un commentaire