Reputation: 164
Please help:
I did add and edit
functionality in QuickBooks
through QuickBooks SDK
using my windows application (C#).
Now, I want to know, how to do delete operation
in QuickBooks
using QuickBooks SDK
?
This is my XML Request:
<?xml version="1.0"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<EmployeeModRq requestID="1">
<EmployeeMod>
<ListID>800002A0-1477976825</ListID>
<EditSequence>1477977063</EditSequence>
<IsActive>False</IsActive>
<FirstName>Bobby</FirstName>
<MiddleName></MiddleName>
<LastName>Westbrooks(111-11-1111)</LastName>
<EmployeeAddress>
<Addr1>4205 Coleman</Addr1>
<City>Memphis</City>
<PostalCode>38128</PostalCode>
</EmployeeAddress>
<SSN>111-11-1111</SSN>
<Email>[email protected]</Email>
<EmergencyContacts>
<PrimaryContact>
<ContactName>Rhonda Westbrooks</ContactName>
<ContactValue>0</ContactValue>
</PrimaryContact>
</EmergencyContacts>
<HiredDate>2015-11-11</HiredDate>
<ReleasedDate>2015-11-11</ReleasedDate>
<BirthDate>2015-11-11</BirthDate>
</EmployeeMod>
</EmployeeModRq>
</QBXMLMsgsRq>
</QBXML>
</xml>
Upvotes: 2
Views: 90
Reputation: 27952
You can use the ListDel
request to delete employees (and other List
type objects like customers, vendors, etc).
From the OSR:
ListDel - Delete a list object
ou can only delete a list item from a QuickBooks company file if the file is open in single-user mode. If the file is open in multiuser mode, your application will receive an error. (This restriction does not apply to deleting or voiding transaction objects.)
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.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>
Upvotes: 3