6 Replies Latest reply on Nov 27, 2017 2:38 AM by JR_Boulay

    Setting initial view to "Attachments Panel and Page" using the Action Wizard or JS?




      I'm using an action to set the inital views and add a footer and a watermark to documents. These are out of necessity processed one by one. So far the Action Wizard has been perfect for my needs. Now I need to have the initial view settings changed from "Bookmark Panel and Page" to Attachments Panel and page", but that option is not one of the open options you get under "Set Open Options" (as below). I know I can simply push Ctrl+D and change the settings easily enough after I've done everything else to the doucment(s), but since I already had my work semi-automated I would like to save my keyboard from some wear.




      The action I use currently looks like this:


      (the javascript (which I found somewhere on the web and modified slightly) adds the document name as a pseudo footer (watermark), while the footer action adds the page numbers, skipping the first page. The save is the only way I've found to turn off fast web view. I had some hiccups in the start so I never got around to adding a save in the end.



      Is there a way to get the document Open Options to be set the way I want, in a similar fashion to what I'm already doing?  I've google quite a bit and found the code below, but it seems to close the bookmarks and/or attachment pane if it is already open.


      var oObj = event.target;
      var fileAttachments = oObj.dataObjects;


      if (fileAttachments != null)
          this.rawValue = fileAttachments.length;


      if (this.rawValue > 0)
          attachImage.presence = "visible";

      and this



      any help would be great.