Charge
Most types of records are also supported in REST web services. For a list of all records supported in REST, see REST Web Services Supported Records.
For information about working with this record type in REST web services, see Charge.
The charge record is used to represent a single billable amount that a client must pay.
This record is defined in the tranCust (customers) XSD, where it is called Charge.
The charge record is available when the Charge-Based Billing feature is enabled at Setup > Company > Setup Tasks > Enable Features, on the Transactions subtab. When the feature is enabled, you can access the charge record by choosing Transactions > Customers > Create Charges > List. For details about working with this record manually, see Generating Charges.
Supported Operations
add | addList | delete | deleteList | get | getList | search | update | updateList | upsert | upsertList
You can also use the asynchronous equivalents of SOAP web services list operations. For information about asynchronous operations, see SOAP Web Services Asynchronous Operations. For more information about request processing, see Synchronous Versus Asynchronous Request Processing.
Field Definitions
The SOAP Schema Browser includes definitions for all body fields, sublist fields, search filters, and search joins available to this record. For details, see the SOAP Schema Browser’s charge reference page. For information about using the SOAP Schema Browser, see SOAP Schema Browser.
Code Sample
The following example shows how to create a charge record.
public void testCharge() throws Exception{
c = new NLWsClient();
Charge charge = new Charge();
charge.setBillTo(mrr("115"));
charge.setStage(ChargeStage._holdForBilling);
charge.setAmount(3.0);
charge.setChargeDate(Calendar.getInstance());
charge.setChargeType(ChargeRuleType._fixedDate);
charge.setRate("2");
charge.setQuantity(2.0);
charge.setAmount(16.0);
charge.setBillingItem(mrr("117"));
charge.setCurrency(mrr("1"));
charge.setSalesOrder(mrr("167"));
charge.setSalesOrderLine(mrr("1"));
charge.setProjectTask(mrr("3307"));
charge.setTimeRecord(mrr("3"));
c.addRecord(charge);
}