Billing Class

You can use the billing class record to create different rates that you can use when calculating the cost of a resource’s time on a project. You can use SuiteScript to create, update, and delete billing class records.

The internal ID for this record is billingclass.

The billing class record is available when the Per-Employee Billing Rates feature is enabled at Setup > Company > Enable Features, on the Employees tab. When the feature is enabled, you can access the billing class record in the UI by choosing Setup > Accounting > Billing Classes > New.

For help working with this record in the UI, see Using Billing Classes.

See the SuiteScript Records Browser for all internal IDs associated with this record.

Note:

For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.

For information about scripting with this record in SuiteScript, see the following help topics:

Supported Script Types

The billing class record is scriptable in server SuiteScript only.

All three user events are supported: beforeLoad, beforeSubmit, and afterSubmit.

Supported Functions

The billing class record is fully scriptable — it can be created, updated, copied, deleted, and searched using SuiteScript.

Field Definitions

See the SuiteScript Records Browser for all internal IDs associated with this record. For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.

Code Sample

The following sample shows how to create a billing class record.

          var billingClass = record.create({
    type: record.Type.BILLING_CLASS
});

billingClass.setValue({
    fieldId: 'name',
    value: 'Billing Class'
});
billingClass.setValue({
    fieldId: 'description',
    value: 'Billing Class Description'
});
billingClass.setValue({
    fieldId: 'isinactive',
    value: false
});
billingClass.setSublistValue({
    sublistId: 'pricecost',
    fieldId: 'price',
    line: 1,
    value: 2.56
}); 

        

The following sample shows how to delete a billing class record.

          record.delete({
    type: record.Type.BILLING_CLASS,
    id: recId
}); 

        

Related Topics

General Notices