Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
NetSuite Tip - Uploading a file to an FTP server N/sftp
var connection = sftp.createConnection({
username: userName,
passwordGuid: passGUID,
url: URL,
directory: '/',
hostKey: hostKey
});
//if you have a xml content or json content, create them as a file and upload to FTP
//Module: N/file :> file
var FileToUpload = file.create({
fileType: file.Type.PLAINTEXT,
name: XMLfileName,
contents: soData, //here soData refers to a xml body
});
connection.upload({
directory: '/Outbox/To be Processed', //directory of FTP to upload
file: FileToUpload,
filename: XMLfileName,
replaceExisting: true
});