Reputation: 87
Using QB SDK 12.0
I have a scenario where I create a new Employee and then a Sales Rep using the Employee ListID.
If I try to enter a Sales Rep that duplicates and existing Initial, the Sales Rep fails and then I want to delete the Employee.
I don't see how I can delete the Employee, or any List item (Customer, Vendor, etc) for that matter. Is it possible, or do I have to mark them IsActive = False?
Rick
Upvotes: 2
Views: 839
Reputation: 27952
You can use ListDel to delete list objects (customers, vendors, employees, items, etc.).
The qbXML syntax is:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="12.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<ListDelRq>
<!-- ListDelType may have one of the following values: Account, BillingRate, Class, Currency, Customer, CustomerMsg, CustomerType, DateDrivenTerms, Employee, InventorySite, ItemDiscount, ItemFixedAsset, ItemGroup, ItemInventory, ItemInventoryAssembly, ItemNonInventory, ItemOtherCharge, ItemPayment, ItemSalesTax, ItemSalesTaxGroup, ItemService, ItemSubtotal, JobType, OtherName, PaymentMethod, PayrollItemNonWage, PayrollItemWage, PriceLevel, SalesRep, SalesTaxCode, ShipMethod, StandardTerms, ToDo, UnitOfMeasureSet, Vehicle, Vendor, VendorType, WorkersCompCode -->
<ListDelType >ENUMTYPE</ListDelType> <!-- required -->
<ListID >IDTYPE</ListID> <!-- required -->
</ListDelRq>
</QBXMLMsgsRq>
</QBXML>
More qbXML examples:
Upvotes: 2