What does `req.options.preview` do in a script?



  • I've seen this code in some legacy reports' scripts in my org but I can't seem to find documentation on what it means. And yes, I did search on the jsreport site and forum but couldn't find much or anything helpful.
    The code is: req.options.preview = false
    I logged the options object and it's just this (before setting it to false):

    "options": {
          "preview": "true"
    

    What does preview refer to here? Thanks in advance for your help



  • This flag is used to mark the request running from jsreport studio.

    Maybe you use it to disable the office preview. However, you should use req.options.office.preview=false instead.
    https://jsreport.net/learn/office-preview


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.