<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to download attachment in same window in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/how-to-download-attachment-in-same-window/m-p/3079731#M1104</link>
    <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;There is one attachment variable in the record producer&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when the user clicks on the hyperlink(&lt;FONT color="#FF0000"&gt;Download template here&lt;/FONT&gt;), the template gets downloaded (the form remains opened), no additional tabs should appear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayshinde_0-1729578973060.png" style="width: 651px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/396364iF52D1D0B96FBECB0/image-dimensions/651x114/is-moderation-mode/true?v=v2" width="651" height="114" role="button" title="mayshinde_0-1729578973060.png" alt="mayshinde_0-1729578973060.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Oct 2024 06:38:02 GMT</pubDate>
    <dc:creator>Community Alums</dc:creator>
    <dc:date>2024-10-22T06:38:02Z</dc:date>
    <item>
      <title>How to download attachment in same window</title>
      <link>https://www.servicenow.com/community/community-central-forum/how-to-download-attachment-in-same-window/m-p/3079731#M1104</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;There is one attachment variable in the record producer&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when the user clicks on the hyperlink(&lt;FONT color="#FF0000"&gt;Download template here&lt;/FONT&gt;), the template gets downloaded (the form remains opened), no additional tabs should appear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayshinde_0-1729578973060.png" style="width: 651px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/396364iF52D1D0B96FBECB0/image-dimensions/651x114/is-moderation-mode/true?v=v2" width="651" height="114" role="button" title="mayshinde_0-1729578973060.png" alt="mayshinde_0-1729578973060.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 06:38:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/how-to-download-attachment-in-same-window/m-p/3079731#M1104</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2024-10-22T06:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to download attachment in same window</title>
      <link>https://www.servicenow.com/community/community-central-forum/how-to-download-attachment-in-same-window/m-p/3079788#M1105</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;From SN OOB, the attachment variable always opens in a new tab since it’s designed to download or view the attachment. Since loading in current page might reload the form or pop up with “changes you made will be remoed”.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, Customization is possible, but it depends on how important the use case is.&lt;/P&gt;
&lt;P&gt;Try out this Client script onLoad:&lt;/P&gt;
&lt;P&gt;function openAttachmentInSameTab(attachmentSysId) {&lt;/P&gt;
&lt;P&gt;attachmentSysId = xyz //get this via a new ScriptInclude (GlideAjax call) &amp;gt; getRecentSysID based on orderByDesc(‘sys_created_on’) with setLimit(1) on the Attachment table.&lt;BR /&gt;var attachmentURL = '/sys_attachment.do?sys_id=' + &lt;STRONG&gt;attachmentSysId&lt;/STRONG&gt;;&lt;BR /&gt;window.location.href = attachmentURL;&amp;nbsp;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;This is an overhead to the system, but depends on customer requirements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 07:28:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/how-to-download-attachment-in-same-window/m-p/3079788#M1105</guid>
      <dc:creator>Akash4</dc:creator>
      <dc:date>2024-10-22T07:28:00Z</dc:date>
    </item>
  </channel>
</rss>

