<?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 Create a new entry in a customer table from a catalog items in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/create-a-new-entry-in-a-customer-table-from-a-catalog-items/m-p/3044687#M527999</link>
    <description>&lt;P&gt;Hi. I'm trying to create a new entry in a custom table from the value in a catalog item.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My table name is '&lt;SPAN&gt;u_cmdb_ci_whitelisted_url' the field name I want to populate on the is 'name'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The field in my variables is called '&lt;/SPAN&gt;&lt;SPAN&gt;external_party_organisation_url'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone advise if my script is correct please? (spoiler - it's not working currently!)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;() {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; server = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;GlideRecord&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'u_cmdb_ci_whitelisted_url'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; u_cmdb_ci_whitelisted_url.initialize();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; u_cmdb_ci_whitelisted_url.name = current.variables.external_party_organisation_url;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; u_cmdb_ci_whitelisted_url.insert();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Sep 2024 14:33:05 GMT</pubDate>
    <dc:creator>steveturley</dc:creator>
    <dc:date>2024-09-13T14:33:05Z</dc:date>
    <item>
      <title>Create a new entry in a customer table from a catalog items</title>
      <link>https://www.servicenow.com/community/itsm-forum/create-a-new-entry-in-a-customer-table-from-a-catalog-items/m-p/3044687#M527999</link>
      <description>&lt;P&gt;Hi. I'm trying to create a new entry in a custom table from the value in a catalog item.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My table name is '&lt;SPAN&gt;u_cmdb_ci_whitelisted_url' the field name I want to populate on the is 'name'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The field in my variables is called '&lt;/SPAN&gt;&lt;SPAN&gt;external_party_organisation_url'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone advise if my script is correct please? (spoiler - it's not working currently!)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;() {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; server = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;GlideRecord&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'u_cmdb_ci_whitelisted_url'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; u_cmdb_ci_whitelisted_url.initialize();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; u_cmdb_ci_whitelisted_url.name = current.variables.external_party_organisation_url;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; u_cmdb_ci_whitelisted_url.insert();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 14:33:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/create-a-new-entry-in-a-customer-table-from-a-catalog-items/m-p/3044687#M527999</guid>
      <dc:creator>steveturley</dc:creator>
      <dc:date>2024-09-13T14:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new entry in a customer table from a catalog items</title>
      <link>https://www.servicenow.com/community/itsm-forum/create-a-new-entry-in-a-customer-table-from-a-catalog-items/m-p/3044714#M528000</link>
      <description>&lt;P&gt;You need to use your server for calling function.&amp;nbsp;The server variable holds the GlideRecord for your custom table u_cmdb_ci_whitelisted_url. please refer below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;(function() {
    var server = new GlideRecord('u_cmdb_ci_whitelisted_url'); // Use 'server' as the variable name
    server.initialize(); // Initialize the new record
    server.name = current.variables.external_party_organisation_url; // Set the 'name' field with the variable value
    server.insert(); // Insert the new record into the table
})();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 14:52:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/create-a-new-entry-in-a-customer-table-from-a-catalog-items/m-p/3044714#M528000</guid>
      <dc:creator>Gangadhar Ravi</dc:creator>
      <dc:date>2024-09-13T14:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new entry in a customer table from a catalog items</title>
      <link>https://www.servicenow.com/community/itsm-forum/create-a-new-entry-in-a-customer-table-from-a-catalog-items/m-p/3044746#M528003</link>
      <description>&lt;P&gt;Fantastic! That works. Thank you. I didn't know that about 'server'. Is that because it's a custom table?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 15:25:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/create-a-new-entry-in-a-customer-table-from-a-catalog-items/m-p/3044746#M528003</guid>
      <dc:creator>steveturley</dc:creator>
      <dc:date>2024-09-13T15:25:55Z</dc:date>
    </item>
  </channel>
</rss>

