Discussions
ReferenceError - On Deposite When create through script
I have created custom record 'Transactions Entry - Import'
I am entering data in this custom record.
There is user event script written on aftersubmit event.
After submitting custom record, i am creating 'Deposit' transaction record through script, but its not allowed. Getting error - "ReferenceError: "Syncpaymentrange" is not defined. (NLRecordScripting.fieldChange.f.account#3)"
Here is the code function CreateDepositEntry()
{
var error;
try
{
var headerAcc = nlapiGetFieldValue('custrecord_txn_entry_import_acc');
var vendorId = nlapiGetFieldValue('custrecord_txn_entry_import_payee');
lineVendorId = vendorId;
var headerMemo = nlapiGetFieldValue('custrecord_txn_entry_import_memo');
var checkNum = nlapiGetFieldValue('custrecord_txn_entry_import_check_num');
var tranDate = nlapiGetFieldValue('custrecord_txn_entry_import_date');