diff --git a/src/FileCabinet/SuiteScripts/CashSale/HC_SC_ImportCashSale.js b/src/FileCabinet/SuiteScripts/CashSale/HC_SC_ImportCashSale.js index e4a91a8..3b70f76 100644 --- a/src/FileCabinet/SuiteScripts/CashSale/HC_SC_ImportCashSale.js +++ b/src/FileCabinet/SuiteScripts/CashSale/HC_SC_ImportCashSale.js @@ -2,9 +2,12 @@ * @NApiVersion 2.1 * @NScriptType ScheduledScript */ -define(['N/sftp', 'N/task', 'N/error', 'N/search', 'N/file'], function (sftp, task, error, search, file) { +define(['N/sftp', 'N/task', 'N/error', 'N/search', 'N/file', 'N/runtime'], function (sftp, task, error, search, file, runtime) { function execute(context) { try { + var usageThreshold = 500; // Set a threshold for remaining usage units + var scriptObj = runtime.getCurrentScript(); + //Get Custom Record Type SFTP details var customRecordSFTPSearch = search.create({ type: 'customrecord_ns_sftp_configuration', @@ -68,6 +71,11 @@ define(['N/sftp', 'N/task', 'N/error', 'N/search', 'N/file'], function (sftp, ta }); for (var i=0; i -p @@ -74,6 +77,11 @@ define(['N/sftp', 'N/task', 'N/error', 'N/search', 'N/file'], function (sftp, ta }); for (var i=0; i -p - Example: ssh-keyscan -t ECDSA -p 235 hc-uat.hotwax.io - */ + var usageThreshold = 500; // Set a threshold for remaining usage units + var scriptObj = runtime.getCurrentScript(); var customRecordSFTPSearch = search.create({ type: 'customrecord_ns_sftp_configuration', @@ -73,6 +70,11 @@ define(['N/sftp', 'N/task', 'N/error', 'N/search', 'N/file'], function (sftp, ta }); for (var i=0; i -p - Example: ssh-keyscan -t ECDSA -p 235 hc-uat.hotwax.io - */ + var usageThreshold = 500; // Set a threshold for remaining usage units + var scriptObj = runtime.getCurrentScript(); //Get Custom Record Type SFTP details var customRecordSFTPSearch = search.create({ @@ -74,6 +71,11 @@ define(['N/sftp', 'N/task', 'N/error', 'N/search', 'N/file'], function (sftp, ta }); for (var i=0; i -p - Example: ssh-keyscan -t ECDSA -p 235 hc-uat.hotwax.io - */ + var usageThreshold = 500; // Set a threshold for remaining usage units + var scriptObj = runtime.getCurrentScript(); //Get Custom Record Type SFTP details var customRecordSFTPSearch = search.create({ @@ -74,6 +71,11 @@ define(['N/sftp', 'N/task', 'N/error', 'N/search', 'N/file'], function (sftp, ta }); for (var i=0; i