<?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 Re: Attachment is not getting added from record producer to custom table record in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659689#M1031793</link>
    <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/126675"&gt;@amolpawar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this should help&lt;/P&gt;
&lt;P&gt;(function executeRule(current, previous /*null when async*/ ) {&lt;/P&gt;
&lt;P&gt;// Add your code here "ZZ_YY"&lt;BR /&gt;var gr = new GlideRecord("sys_attachment");&lt;BR /&gt;gr.addQuery("x_infte_intellectu_brandname_clearance", "ZZ_YY" + current.getTableName());&lt;BR /&gt;gr.addQuery("ca954dd0c3f83d102f7798bc7a013179", current.sys_id);&lt;BR /&gt;gr.query();&lt;BR /&gt;if (gr.next()) {&lt;BR /&gt;gr.table_name = current.getTableName();&lt;BR /&gt;gr.update();&lt;BR /&gt;new global.VariableUtil().&lt;STRONG&gt;copyAttachment&lt;/STRONG&gt;(gr.sys_id, current.getTableName(), current.sys_id);&lt;BR /&gt;}&lt;BR /&gt;})(current, previous);&lt;/P&gt;
&lt;P&gt;If my response helped please mark it correct and close the thread so that it benefits future readers.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2023 10:12:30 GMT</pubDate>
    <dc:creator>Ankur Bawiskar</dc:creator>
    <dc:date>2023-09-01T10:12:30Z</dc:date>
    <item>
      <title>Attachment is not getting added from record producer to custom table record</title>
      <link>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659501#M1031725</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a record producer where I have added a variable of type 'Attachment'. I'm able to add attachments in the record producer but I'm unable to get that attachment in my custom table records.&lt;/P&gt;&lt;P&gt;Does anyone know what is the cause behind this?&lt;/P&gt;&lt;P&gt;I've created a custom table to get the records created by that record producer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know what is the root cause and solution to this issue.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AmolPawar_0-1693548723588.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/285452iC13D6AA28C441A22/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AmolPawar_0-1693548723588.png" alt="AmolPawar_0-1693548723588.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see, I can add an attachment in the record producer but unable to see it in the custom table records.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AmolPawar_1-1693549167574.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/285454iCF15F62E132B6868/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AmolPawar_1-1693549167574.png" alt="AmolPawar_1-1693549167574.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Amol&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 06:20:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659501#M1031725</guid>
      <dc:creator>amolpawar</dc:creator>
      <dc:date>2023-09-01T06:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Attachment is not getting added from record producer to custom table record</title>
      <link>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659513#M1031729</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check this community post. It could be helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.servicenow.com/community/developer-forum/unable-to-attach-the-attachments-from-record-producer-to-target/m-p/1435885" target="_blank"&gt;https://www.servicenow.com/community/developer-forum/unable-to-attach-the-attachments-from-record-producer-to-target/m-p/1435885&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Karthik Nagaramu&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 06:29:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659513#M1031729</guid>
      <dc:creator>karthiknagaramu</dc:creator>
      <dc:date>2023-09-01T06:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Attachment is not getting added from record producer to custom table record</title>
      <link>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659681#M1031788</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me with my scenario?&lt;/P&gt;&lt;P&gt;I want to see attachments in header menu.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Amol&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 10:01:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659681#M1031788</guid>
      <dc:creator>amolpawar</dc:creator>
      <dc:date>2023-09-01T10:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Attachment is not getting added from record producer to custom table record</title>
      <link>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659689#M1031793</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/126675"&gt;@amolpawar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this should help&lt;/P&gt;
&lt;P&gt;(function executeRule(current, previous /*null when async*/ ) {&lt;/P&gt;
&lt;P&gt;// Add your code here "ZZ_YY"&lt;BR /&gt;var gr = new GlideRecord("sys_attachment");&lt;BR /&gt;gr.addQuery("x_infte_intellectu_brandname_clearance", "ZZ_YY" + current.getTableName());&lt;BR /&gt;gr.addQuery("ca954dd0c3f83d102f7798bc7a013179", current.sys_id);&lt;BR /&gt;gr.query();&lt;BR /&gt;if (gr.next()) {&lt;BR /&gt;gr.table_name = current.getTableName();&lt;BR /&gt;gr.update();&lt;BR /&gt;new global.VariableUtil().&lt;STRONG&gt;copyAttachment&lt;/STRONG&gt;(gr.sys_id, current.getTableName(), current.sys_id);&lt;BR /&gt;}&lt;BR /&gt;})(current, previous);&lt;/P&gt;
&lt;P&gt;If my response helped please mark it correct and close the thread so that it benefits future readers.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 10:12:30 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659689#M1031793</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2023-09-01T10:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Attachment is not getting added from record producer to custom table record</title>
      <link>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659811#M1031849</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your quick reply, I'll try it.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amol&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 12:16:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/attachment-is-not-getting-added-from-record-producer-to-custom/m-p/2659811#M1031849</guid>
      <dc:creator>amolpawar</dc:creator>
      <dc:date>2023-09-01T12:16:03Z</dc:date>
    </item>
  </channel>
</rss>

