Amortization Template
You use the amortization template record to define the terms of amortization schedules, which are automatically created by the system. For example, on certain transactions, you can associate an amortization template with a line in the item or expense sublist. When the transaction is saved, an amortization schedule based on the template is automatically created. You can use amortization templates in conjunction with journal entry, vendor bill, and vendor credit records.
The internal ID for this record is amortizationtemplate
.
The amortization template record is available only when the Amortization feature is enabled, at Setup > Company > Enable Features, on the Accounting subtab. In the UI, you access this record at Lists > Accounting > Amortization Templates > New.
For help working with amortization templates in the UI, see Creating Amortization Templates.
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.
For information about scripting with this record in SuiteScript, see the following help topics:
Supported Script Types
The amortization template record is supported in server SuiteScript only.
The user events are not supported.
Supported Operations
This record is fully scriptable, which means that the record can be created, updated, copied, deleted, and searched using SuiteScript.
Usage Notes
Be aware of the following:
-
If the Method field (recurrencetype) is set to Custom, then you must include at least one line in the recurrence sublist. In this case, the template cannot be deleted.
-
As in the UI, you cannot use external ID as part of your criteria when searching for amortization template records. You also cannot include external ID in search columns.
-
The amortization template record is similar to the revenue recognition template record — so if you have existing integrations for revenue recognition templates, you may be able to reuse elements of these scripts. The revenue recognition template record is described in Revenue Recognition Template.
Code Sample
The following sample shows how to create amortization templates and perform other basic tasks.
// Create Record
var recAmTemp = record.create({
type: record.Type.AMORTIZATION_TEMPLATE
});
recAmTemp.setValue({
fieldId: 'name',
value: 'Name'
});
recAmTemp.setValue({
fieldId: 'externalid',
value: 'externalId'
});
recAmTemp.setValue({
fieldId: 'isamortization',
value: true
});
recAmTemp.setValue({
fieldId: 'amortizationtype', // Type
value: 'STANDARD'
});
recAmTemp.setValue({
fieldId: 'recurrencetype',
value: 'EVENPERIODSPRORATE' // Method
});
recAmTemp.setValue({
fieldId: 'recognitervalsrc',
value: 'RECEIPTDATE' // Term Source
});
recAmTemp.setValue({
fieldId: 'revrecoffset',
value: 0
});
recAmTemp.setValue({
fieldId: 'periodoffset',
value: 1
});
recAmTemp.setValue({
fieldId: 'acctdeferral',
value: '1'
});
recAmTemp.setValue({
fieldId: 'acctcontra',
value: '1'
});
recAmTemp.setValue({
fieldId: 'accttarget',
value: '1'
});
recAmTemp.setValue({
fieldId: 'amortizationperiod',
value: 20
});
recAmTemp.setValue({
fieldId: 'residual',
value: '1.00'
});
recAmTemp.setValue({
fieldId: 'initialamount',
value: '12.00'
});
recAmTemp.setValue({
fieldId: 'isinactive',
value: false
});
var recId = recAmTemp.save();
// Load Record
var myAmorTemplate = record.load({
type: record.Type.AMORTIZATION_TEMPLATE,
id: recId
});
// Copy
var recCopied = record.copy({
type: record.Type.AMORTIZATION_TEMPLATE,
id: recId
});
// Delete Record
var delrecId = record.delete({
type: record.Type.AMORTIZATION_TEMPLATE,
id: recId
});