How to access Expense object via XML worksheet
For Expense, you can use XML request for the following:
- Inserting Expenses
- Updating Expenses
- Deleting Expenses
- Posting and Voiding Expenses
Expense
Inserting Expense
Here is an example XML request to add new expense in TeamConnect via XML worksheet:
<TeamConnectRequest> <Authentication> <Username>george</Username> <Password>password</Password> </Authentication> <Expense op="insert" action="postTransaction"> <ShortDescription>Dinner with Clients</ShortDescription> <ExpenseDate>2005-07-05</ExpenseDate> <ExpensedBy>george</ExpensedBy> <DefaultCategory>EXPE_ACCO</DefaultCategory> <UnitPrice>$34.00</UnitPrice> <Quantity>1</Quantity> <Project keymap="Name">Samantha Palmer Home Owner Claim</Project> <Contact keymap="NumberString">Emp035295</Contact> <SecurityTypeIID>0</SecurityTypeIID> </Expense> </TeamConnectRequest>
Updating Expenses
Here is an example XML request to update an expense in TeamConnect via XML worksheet:
Note: If the TeamConnect administrator has activated a Duplicate expense Record Manager filter, you may not be able to update Expense with certain duplicate field values. For more information, see (optional) OverrideDuplicateCheck and the System Administration chapter of the Administration Guide.
<TeamConnectRequest> <Authentication> <Username>george</Username> <Password>password</Password> </Authentication> <Expense op="update" ShortDescription="Dinner with Clients"> <UnitPrice>$14.00</UnitPrice> </Expense> </TeamConnectRequest>
Deleting Expenses
Here is an example XML request to delete an expense in TeamConnect via XML worksheet:
Note: You can only delete voided expenses
<TeamConnectRequest> <Authentication> <Username>george</Username> <Password>password</Password> </Authentication> <Expense op="delete" ShortDescription="Dinner with Clients"/> </TeamConnectRequest>
Posting and Voiding Expenses
Here is an example XML request to delete expense relations in TeamConnect via XML worksheet:
<TeamConnectRequest> <Authentication> <Username>george</Username> <Password>password</Password> </Authentication> <Expense op="update" ShortDescription="Dinner with Clients" action="postTransaction"/> <Expense op="update" ShortDescription="Dinner with Prospective Clients" action="voidTransaction"/> </TeamConnectRequest>