Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get file name with extension netsuite suitescript

const ExtensionMap = 
{
    APPCACHE : ".appcache",
    BMPIMAGE : ".bmp",
    CONFIG : ".config",
    CSV : ".csv",
    FLASH : ".swf",
    FREEMARKER : ".ftl",
    GIFIMAGE : ".gif",
    GZIP : ".gz",
    HTMLDOC : ".html",
    ICON : ".ico",
    JAVASCRIPT : ".js",
    JPGIMAGE : ".jpg",
    JSON : "",
    MESSAGERFC : ".eml",
    MP3 : ".mp3",
    MPEGMOVIE : ".mpg",
    MSPROJECT : ".mpp",
    PDF : ".pdf",
    PJPGIMAGE : ".pjpeg",
    PLAINTEXT : ".txt",
    PNGIMAGE : ".png",
    POSTSCRIPT : ".ps",
    QUICKTIME : ".mov",
    RTF : ".rtf",
    SMS : ".sms",
    STYLESHEET : ".css",
    SVG : ".svg",
    TAR : ".tar",
    TIFFIMAGE : ".tiff",
    VISIO : ".vsd",
    XMLDOC : ".xml",
    XSD : ".xsd",
    ZIP : ".zip",
    POWERPOINT : ".pptx",
    WORD : ".docx",
    Excell : ".xslx",
    MISCBINARY : ""
}

let fileName = fileObject.name + ExtensionMap[fileObject.fileType];
log.debug(fileName)
 
PREVIOUS NEXT
Tagged: #file #extension #netsuite #suitescript
ADD COMMENT
Topic
Name
4+4 =