I am using saveRecord client script function. but ...
# suitescript
v
I am using saveRecord client script function. but when i click on save button it does not react saved. could anyone please help me?
n
Your client script is deployed to a record?
v
yes
n
You'll need to share your code
v
define(['N/record','N/log','N/currency'], function (record,log,currency) { function saveRecord(context){ try{ var invoiceRecord = context.currentRecord; log.debug('invoice',invoiceRecord); var transactionDate = invoiceRecord.getValue('trandate'); log.debug('transactionDate',transactionDate); var recordCurrencyValue = invoiceRecord.getValue('currency'); log.debug('recordCurrencyValue',recordCurrencyValue); var recordCurrencyText = invoiceRecord.getText('currency'); log.debug('recordCurrencyText',recordCurrencyText); }catch(e){ log.debug('error',e); } } return { saveRecord : saveRecord } } );
c
You always need to return true (allow the save) or false (do not allow the save)
👍 1
v
Thank you sir, its done