download a File from File Cabinet


/ Published in: JavaScript
Save to your folder(s)

How to download file from file cabinet


Copy this code and paste it in your HTML
  1. function userEventBeforeLoad(type, form, request){
  2.  
  3.  
  4.  
  5. // Load file - can be also used nlapiLoadFile('fileId') syntax
  6.  
  7. var file = nlapiLoadFile('Images/Desert.jpg');
  8.  
  9.  
  10.  
  11. var url = "https://system.netsuite.com" + file.getURL();
  12.  
  13.  
  14. nlapiSetFieldValue('hyperlinkFieldId', url);
  15.  
  16.  
  17.  
  18. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.