addAccount()
Function Declaration |
|
Type |
Object function |
Description |
This function enables the plug-in to add bank or credit card accounts you want to link to corresponding accounts in NetSuite. NetSuite displays the supplied accounts on the Account Linking subtab on a Bank Reconciliation format profile record. This function should be called for each account being linked. |
Returns |
void |
options is a JavaScript object with the following input parameters:
Parameter |
Type |
Required |
Description |
Since |
---|---|---|---|---|
accountMappingKey |
String |
Yes |
The financial institution account’s unique identifier. For compliance reasons, this cannot be a credit card number. To ensure that the account mapping key does not contain a credit card number, NetSuite removes all non-numeric characters.
|
2020.1 |
displayName |
String |
No |
The financial institution account name capable of being displayed. |
2020.1 |
accountType |
String |
Yes |
The account type that should map to a NetSuite account type. Valid types include:
|
2020.1 |
currency |
String |
Yes |
The financial institution account currency code. Use this on the Account Linking or Employee Linking subtab to filter by NetSuite accounts with the same currency. The currency input parameter must be a valid ISO 4217 currency code. |
2020.1 |
groupName |
String |
Yes |
The financial institution name that can be displayed, which is used for grouping accounts from the same financial institution. |
2020.1 |
lastUpdated |
String |
No |
The last time the financial institution updated data for an account. If the financial institution has not updated the account since the last import, then you know there is no new data to import. If getAccounts() returns a lastUpdated value for an account, NetSuite calls getTransactionData(), and the dataEndTime field for that account is populated based on the lastUpdated value. This indicates to the plug-in that NetSuite is requesting bank data up to the date provided by the lastUpdated value. |
2020.1 |
Example
context.addAccount({
accountMappingKey: "12345",
displayName: "TD Bank - 98765",
accountType: "BANK",
currency: "USD",
groupName: "TD",
lastUpdated: '2018-01-01T15:00:00'
})