getTransactionSources()
|
Function Declaration |
|
|
Type |
Interface function; optional entry point. |
|
Description |
This function enables the plug-in to import multiple bank statement files in one import cycle. Use |
|
Returns |
void |
|
Input Parameters |
context - a JavaScript object with the following properties: |
Example
function getTransactionSources(context) {
var sourceNames = ['file1.csv', 'file2.csv', 'file3.csv'];
context.addSourceList({
sourceList: sourceNames.map(function (name) {
return {name: name};
})
});
}
Be aware of the following:
-
Supply the source list through
context.addSourceList({sourceList: [...]}). Returning an array fromgetTransactionSources()does not supply the source list. -
NetSuite accepts up to 100 sources across all
addSourceList()calls during a single invocation ofgetTransactionSources(). Additional entries are ignored without an error in Bank Import History or the logs. -
Your need to implement your plug-in to track submitted files and supply any remaining files during subsequent import cycles.
-
If the source list is empty, NetSuite creates a successful Bank Import History record to indicate that no files were selected for import. NetSuite does not invoke
getTransactionData(). -
This function is optional. If the plug-in does not implement it, NetSuite uses the existing bank data import workflow.