I have 2 scripts where I would like to import 1 sc...
# suitescript
p
I have 2 scripts where I would like to import 1 script into the other and use a function from that script. I am importing the script this way (script being imported is exportRates.js) -
define(['N/currentRecord', 'N/search', 'N/ui/dialog', './exportRates.js'], (currentRecord, search, dialog, rates)
The script I am importing is in the same folder where the script I am importing to is. And am calling the function this way:
rates();
But I am getting a rates is not a function error. If someone can point me in the right direction would be appreciated.
b
try
rates.rates()
p
thanks! that worked.
👍🏼 1