Billing Rate Card

The internal ID for this record is billingratecard.

If you use billing classes, you can also use billing rate cards to define different billing rates for groups of billing classes. These rate cards can then be used to set billing rates on charge-based projects using time-based charge rules. You can use SuiteScript to read, create, update, delete, and search billing rate card records.

The billing rate card record is available when the Billing Rate Cards feature is enabled at Setup > Company > Enable Features, on the Employees tab. The Per-Employee Billing Rates and Charge-Based Billing features are also required to use billing rate cards. When the feature is enabled, you can access the billing rate card record in the UI by choosing Setup > Accounting > Billing Rate Cards > New.

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

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

See Billing Rate Card Record Macros for the macros associated with this record. For more information about actions and macros, see Overview of Record Action and Macro APIs.

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 account record is scriptable in both client and server SuiteScript.

Supported Functions

The following SuiteScript actions are supported for this record:

Usage Notes

There are two sublists for rate card pricing: ratecardpricing and ratecardpricingmulti. These two lists are mutually exclusive. The first list, ratecardpricing, is a simple sublist used when the Multiple Currencies feature is not enabled. The second list, ratecardpricingmulti, is a matrix sublist used when the Multiple Currencies feature is enabled.

When this feature is enabled, the content of ratecardpricing is a subset of ratecardpricingmulti. If you enter information into ratecardpricing and then enable the Multiple Currencies feature, the original content is in a column in the ratecardpricingmulti sublist.

Note:

Copy and transform are not supported.

Code Samples

The following sample shows how to create a new billing rate card with a single billing class without multiple currencies.

          var myBillingRate = record.create({
    type: record.Type.BILLING_RATE_CARD
});
myBillingRate.setValue({
    fieldId: 'name',
    value: 'abcd'
});
myBillingRate.setSublistValue({
    sublistId: 'ratecardpricing',
    fieldId: 'price',
    line: 1,
    value: 11
});
var recId = myBillingRate.save(); 

        

The following sample shows how to update the billing rate card name and a price in British pounds when multiple currencies is enabled.

          var myBillingRate = record.load({
    type: record.Type.BILLING_RATE_CARD,
    id: 3
});
var name = myBillingRate.getValue({
    fieldId: 'name'
});
var updatedName = name + ' - updated';
myBillingRate.setValue({
    fieldId: 'name',
    value: updatedName
});
myBillingRate.setSublistValue({
    sublistId: 'ratecardpricingmulti',
    fieldId: 'price_2_',
    line: 1,
    value: 5
});
var recId = myBillingRate.save(); 

        

The following sample shows how to use a user event script to update a price.

          // To get a new record in SuiteScript 2.x, use the following code in a beforeLoad, beforeSubmit, 
// or afterSubmit user event script:
function afterSubmit(context) {
    var newRec = context.newRecord; 
}
// then use the new record as follows:
var origPrice = newRec.getSublistValue({
    sublist: 'ratecardpricing',
    fieldid: 'price',
    line: 1
});

var newPrice = 11;

newRec.setSublitValue({
    sublistId: 'ratecardpricing',
    fieldId: 'price',
    line: 1,
    value: 'newPrice'
});
log.debug({
    title: 'Price',
    details: 'price changed from ' + origPrice + ' to ' + newPrice
}); 

        

Related Topics

Using Billing Rate Cards
Billing and Invoices
Using Billing Classes
Working with the SuiteScript Records Browser
SuiteScript Supported Records
Lists

General Notices