CustomLines
Type |
Interface input object |
Description |
Contains an array of all custom lines with GL impact in a transaction as CustomLine objects. Use this object to add and modify custom lines with GL impact on a transaction. Create a new CustomLine object with addNewLine(). For more information, see Custom GL Lines Plug-in Process Flow. |
Methods |
|
Child Object(s) |
addNewLine()
Function Declaration |
|
Type |
Object method |
Description |
Adds a CustomLine object to the parent CustomLines object in a Custom GL Lines plug-in implementation and returns the new object. Use this method to add a custom line with GL impact to a transaction. After you create the custom line, use the methods available to the CustomLine object to set the properties of the custom line, including the general ledger account ID and the amount of the custom line.
Note:
If you use the Multi-Book Accounting feature and want this line to be copied to the secondary accounting books, use setBookSpecific(bookSpecific). |
Returns |
|
Input Parameters |
None. |
Parent object |
Example
function customizeGlImpact(transactionRecord, standardLines, customLines, book)
{
...
var newLine = customLines.addNewLine();
newLine.setCreditAmount(standardLines.getLine(0).getCreditAmount());
newLine.setAccountId(standardLines.getLine(0).getAccountId());
newLine.setMemo("Payment catches both revenue and cash.");
...
var newLine = customLines.addNewLine();
newLine.setDebitAmount(standardLines.getLine(1).getDebitAmount());
newLine.setAccountId(standardLines.getLine(1).getAccountId());
newLine.setMemo("Payment catches both revenue and cash.");
...
}
getCount()
Function Declaration |
|
Type |
Object method |
Description |
Returns the number of custom lines with GL impact for a specific accounting book in a transaction. These lines are added with addNewLine(). Use this method in conjunction with getLine(index) to get individual custom lines after you add them in the plug-in implementation. |
Returns |
int |
Input Parameters |
None. |
Parent object |
Example
function customizeGlImpact(transactionRecord, standardLines, customLines, book)
{
...
for (var i = 0; i < customLines.getCount(); i++)
{
// get the line
var currLine = customLines.getLine(i);
...
}
}
getLine(index)
Function Declaration |
|
Type |
Object method |
Description |
Returns a CustomLine object that represents a custom line with GL impact. CustomLine objects are stored in the CustomLines object starting at index |
Returns |
|
Input Parameters |
index {int} — Integer value for the CustomLine object at the specified position in the CustomLines object. |
Parent object |
Example
function customizeGlImpact(transactionRecord, standardLines, customLines, book)
{
...
for (var i = 0; i < customLines.getCount(); i++)
{
// get the line
var currLine = customLines.getLine(i);
...
}
}