title: Generate GUID at runtime without using form in NetSuite
body: <p>Hye there,</p>
  
  <p>I'm trying to prepare a scheduled script in NetSuite which will pick a particular directory from file cabinet and deploy it on SFTP server. I'm using 2.0 module and here is my code -</p>
  
  <pre><code>require(["N/sftp",'N/record','N/file'], function(sftp,record,file) {
  
      function onRequest() {
          var myPwdGuid = "13139ac567b14f74bdaXXXXXXX";
          var myHostKey = "AAAAB3NzaC1ycXXXXX";
  
          var connection = sftp.createConnection({
              username: 'Your user name',
              passwordGuid: myPwdGuid,
              url: 'Your host name',
              directory: '/directory to upload files/',
              hostKey: myHostKey
          });
  
          var myFileToUpload = file.create({
              name: 'originalname.js',
              fileType: file.fileType.PLAINTEXT,
              contents: 'I am a test file. Hear me roar.'
          });
  
          connection.upload({
              directory: 'relative/path/to/remote/dir',
              filename: 'newFileNameOnServer.js',
              file: myFileToUpload,
              replaceExisting: true
          });
  
          var downloadedFile = connection.download({
              directory: 'relative/path/to/file',
              filename: 'downloadMe.js'
          });
      }
  
      onRequest();
      return {
          onRequest: onRequest
      };
  });
  </code></pre>
  
  <p>Now the issue is when i try to run these lines of code i get an error saying "AN_ERROR_OCCURRED_WHILE_DECRYPT_PASSWORDGUID". 
  What i've found so far through my research is GUID can only be generated by SuitLet form having credential field which will again require GET and POST method. However i Dont want to create a suitelet and invoke it manually in order to generate GUID. All i want to to do is - Run a scheduled script which will Establish connection to SFTP. Pick a directory in file cabinet and upload it on SFTP.</p>
  
  <p>Any help would be greatly appreciated! Thanks in advance!</p>