CustomLine
Type |
Object |
Description |
Contains all properties for a single custom line for the GL impact on a transaction. Use the methods and properties available to the CustomLine object to set the values for the custom line and define plug-in implementation functionality based on the values. The CustomLines object contains a reference to each custom GL impact line. Create a new CustomLine object with addNewLine(). |
Properties |
|
Methods |
|
Parent Object(s) |
accountId
Property Description |
Sets the account ID property for a CustomLine object in a primary or secondary book. This value is the internal NetSuite ID for a general ledger account. You must use this property to set the account to be debited or credited for a custom line. You can view the internal NetSuite ID for all accounts on the Chart of Accounts page at Setup > Accounting > Chart of Accounts. You can use helper functions in a utility file to customize the internal NetSuite account IDs in the plug-in implementation logic. |
Type |
Object method |
Parent object |
amount
Property Description |
Returns the amount for a CustomLine. If it is a credit, than the amount will include a negative sign. |
Type |
string (read-only) |
Parent object |
classId
Property Description |
Sets the class ID value for a CustomLine object in a primary or secondary book. This value is the internal NetSuite ID for a class. Classes are categories that you can create to track records such as financials, transactions, and employees. You can view all classes defined in NetSuite at Setup > Company > Classes. See also classId. You can use helper functions in a utility file to avoid adding the internal NetSuite IDs into the plug-in implementation logic. You can also access the runtime.User object with the N/runtime Module to get the preferences for classes at Setup > Accounting > Preferences > Accounting Preferences (Administrator). |
Type |
number -Internal NetSuite ID for a class |
Parent object |
creditAmount
Property Description |
Sets the credit amount of a CustomLine object in a primary or secondary book. The value is rounded to currency precision. To set a debit amount, use the debitAmount property.
Note:
The currency for the amount of the custom line depends on the subsidiary and accounting book to which the GL impact posts. For example, if the accounting book being processed by the plug-in implementation uses USD, the currency for the amount set by this method is USD. |
Type |
string -The value of a credit on a general ledger account. This must be a positive value |
Parent object |
debitAmount
Property Description |
Sets the debit amount of a CustomLine object in a primary or secondary book. The value is rounded to currency precision. To set a credit amount, use the creditAmount property.
Note:
The currency for the amount on the custom line depends on the accounting book to which the GL impact posts. For example, if the accounting book being processed by the plug-in implementation uses USD, the currency for the amount set by this method is USD. |
Type |
string -The value of a credit on a general ledger account. This must be a positive value |
Parent object |
departmentId
Property Description |
Sets the department ID for a CustomLine object in a primary or secondary book. This value is the internal NetSuite ID for a department. Departments are listed first on transactions, and are useful when designating transactions and employees as part of an internal team. You can view all departments defined in NetSuite at Setup > Company > Departments. See also departmentId. You can use helper functions in a utility file to avoid adding the internal NetSuite IDs into the plug-in implementation logic. You can also access the runtime.User object with the N/runtime Module to get the preferences for locations at Setup > Accounting > Accounting Preferences. |
Type |
Number -Internal NetSuite ID for a department. |
Parent object |
entityId
Property Description |
Sets the entity ID property for a CustomLine object in a primary or secondary book. Supported entity types include:
The following restrictions apply to setting of entities on custom GL lines:
Note:
This property does not set the sales representative for the line, and it does not change the date of the first sale for the customer. |
Type |
number -An internal NetSuite ID for an entity. |
Parent object |
isBookSpecific
Property Description |
Sets a custom GL impact line to affect only the primary book in a Custom GL plug-in implementation. If you use this property and set the value to If you do not use this property or set the value to
Note:
This property only applies if you use the Multi-Book Accounting feature and the property is being called for the primary accounting book. It has no impact on book-specific journal entries. For more information about how the plug-in implementation processes book-specific lines, see Custom GL Lines Plug-in Process Flow. |
Type |
boolean -Use |
Parent object |
locationId
Property Description |
Sets the location ID for a CustomLine object in a primary or secondary book. This value is the internal NetSuite ID for a location. Use locations to track information about employees and transactions for multiple offices or warehouses. You can view all locations defined in NetSuite at Setup > Company > Locations. See also locationId. You can use helper functions in a utility file to avoid adding the internal NetSuite IDs into the plug-in implementation logic. You can also access the runtime.User object with the N/runtime Module to get the preferences for locations at Setup > Accounting > Accounting Preferences. |
Type |
number -Internal NetSuite ID for a location. |
Parent object |
memo
Property Description |
Sets the Memo field on a CustomLine object. |
Type |
string -String text for the Memo field |
Parent object |
segments
Property Description |
Returns a string array of available custom segment IDs for which a value can be set. |
Type |
string[] (read-only) |
Parent object |
getSegmentValueId(options)
Method Description |
Returns the internal NetSuite ID for the custom segment value set on the line on a CustomLine object. Use this method to define plug-in implementation functionality based on the value for a GL impact line. |
Returns |
number |
Parent object |
Parameters
Parameter |
Type |
Required/Optional |
Description |
options.segmentId |
String |
Required |
String value of the custom segment ID. |
setSegmentValueId(options)
Method Description |
Sets custom segment values on a CustomLine object NetSuite assigns custom segment values as follows:
|
Returns |
Void |
Parent object |
Parameters
Parameter |
Type |
Required/Optional |
Description |
options.segmentId |
string |
Required |
String value of the custom segment ID. |
options.segmentValueId |
number |
Optional |
Internal ID of the custom segment value that the custom line should be set to. Omitting this parameter unsets the custom segment value. |