<?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: cannot access table from a scoped application in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079896#M736822</link>
    <description>&lt;P&gt;here is the whole script if you need that&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var user = '581949a4136f4b80ce8b7d576144b08d';&lt;BR /&gt;var arrayUtil = new global.ArrayUtil();&lt;/P&gt;
&lt;P&gt;var uat_software_array = [];&lt;BR /&gt;var uat_software_array_display = [];&lt;BR /&gt;var new_job_title_software_array = [];&lt;BR /&gt;var new_job_title_software_array_display = [];&lt;BR /&gt;var add_add_gen_access_array = [];&lt;BR /&gt;var remove_add_gen_access_array = [];&lt;BR /&gt;var add_add_gen_access_array_display = [];&lt;BR /&gt;var remove_add_gen_access_array_display = [];&lt;/P&gt;
&lt;P&gt;var new_job_title_software_string = "";&lt;BR /&gt;var uat_software_string = "";&lt;BR /&gt;var uat_software_string_display = "";&lt;BR /&gt;var new_job_title_software_string_display = "";&lt;/P&gt;
&lt;P&gt;var counter = 0;&lt;/P&gt;
&lt;P&gt;function QueryUAT()&lt;BR /&gt;{&lt;BR /&gt;var gr = new GlideRecord('u_user_access_list');&lt;BR /&gt;gr.addQuery('u_user', 'bdb4e9601341b2006bda75c36144b062');&lt;BR /&gt;gr.addQuery('active', true);&lt;BR /&gt;gr.query();&lt;BR /&gt;while(gr.next())&lt;BR /&gt;{&lt;BR /&gt; uat_software_string += gr.u_service + ',';&lt;BR /&gt; uat_software_string_display += gr.u_service.getDisplayValue() + ',';&lt;BR /&gt;}&lt;BR /&gt; &lt;BR /&gt; uat_software_array = uat_software_string.split(',');&lt;BR /&gt; uat_software_array.length --;&lt;/P&gt;
&lt;P&gt;uat_software_array_display = uat_software_string_display.split(',');&lt;BR /&gt; uat_software_array_display.length --;&lt;BR /&gt; gs.addInfoMessage("Current Software - " + uat_software_array_display.toString());&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;function QueryNewJobTitle()&lt;BR /&gt;{&lt;BR /&gt; var gr = new GlideRecord('x_prole_emp_onb_employee_onboarding');&lt;BR /&gt; gr.addQuery('u_job_title', 'e9885e5113268bc08242335fd144b0f7');&lt;BR /&gt; gr.addQuery('u_list_location', 'Draper Headquarters');&lt;BR /&gt; gr.query();&lt;BR /&gt; while(gr.next())&lt;BR /&gt; {&lt;BR /&gt; new_job_title_software_string += gr.u_add_gen_access + ',';&lt;BR /&gt; new_job_title_software_string_display += gr.u_add_gen_access.getDisplayValue() + ',';&lt;BR /&gt; }&lt;BR /&gt; new_job_title_software_array = new_job_title_software_string.split(',');&lt;BR /&gt; new_job_title_software_array.length --;&lt;/P&gt;
&lt;P&gt;new_job_title_software_array_display = new_job_title_software_string_display.split(',');&lt;BR /&gt; new_job_title_software_array_display.length --;&lt;BR /&gt; gs.addInfoMessage("New Software - " + new_job_title_software_array_display.toString());&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;function ArrayDiff()&lt;BR /&gt;{&lt;BR /&gt; add_add_gen_access_array = arrayUtil.diff(new_job_title_software_array, uat_software_array); &lt;BR /&gt; add_add_gen_access_array_display = arrayUtil.diff(new_job_title_software_array_display, uat_software_array_display);&lt;/P&gt;
&lt;P&gt;remove_add_gen_access_array = arrayUtil.diff(uat_software_array, new_job_title_software_array);&lt;BR /&gt; remove_add_gen_access_array_display = arrayUtil.diff(uat_software_array_display, new_job_title_software_array_display);&lt;BR /&gt; gs.addInfoMessage("Add This - " + add_add_gen_access_array_display.toString());&lt;BR /&gt; gs.addInfoMessage("Remove This - " + remove_add_gen_access_array_display.toString());&lt;BR /&gt; gs.addInfoMessage('Remove Length - ' + remove_add_gen_access_array.length);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;QueryUAT();&lt;BR /&gt;QueryNewJobTitle();&lt;BR /&gt;ArrayDiff();&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jul 2018 22:17:24 GMT</pubDate>
    <dc:creator>kazidon</dc:creator>
    <dc:date>2018-07-10T22:17:24Z</dc:date>
    <item>
      <title>cannot access table from a scoped application</title>
      <link>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079893#M736819</link>
      <description>&lt;P&gt;I have a scoped application that I am trying to have access a table in the global application. I have set up the cross scope privileges and I don't have an issue access other tables from Global just that one. Any idea on what might be going on? here are some screen shots to help.&lt;/P&gt;
&lt;P&gt;cross scope privilege set up&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/65041iEB6AFC34E66E89F3/image-size/large?v=v2&amp;amp;px=999" srcset="/community/image/serverpage/image-id/65041iEB6AFC34E66E89F3/image-size/large?v=v2&amp;amp;px=999 1.0x" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;user access list on global&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/65043i3EC2873595323E63/image-size/large?v=v2&amp;amp;px=999" srcset="/community/image/serverpage/image-id/65043i3EC2873595323E63/image-size/large?v=v2&amp;amp;px=999 1.0x" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 22:01:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079893#M736819</guid>
      <dc:creator>kazidon</dc:creator>
      <dc:date>2018-07-10T22:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: cannot access table from a scoped application</title>
      <link>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079894#M736820</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Configuration option looks good to me.&amp;nbsp;Can you share additional details like the script that you are executing to access the table?.&amp;nbsp;Also is this on your personal dev instance?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 22:05:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079894#M736820</guid>
      <dc:creator>Pradeep Sharma</dc:creator>
      <dc:date>2018-07-10T22:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: cannot access table from a scoped application</title>
      <link>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079895#M736821</link>
      <description>&lt;P&gt;this is my work dev instance, and here is the script I'm and trying to run&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;function QueryUAT()&lt;BR /&gt;{&lt;BR /&gt;var gr = new GlideRecord('u_user_access_list');&lt;BR /&gt;gr.addQuery('u_user', 'bdb4e9601341b2006bda75c36144b062');&lt;BR /&gt;gr.addQuery('active', true);&lt;BR /&gt;gr.query();&lt;BR /&gt;while(gr.next())&lt;BR /&gt;{&lt;BR /&gt; uat_software_string += gr.u_service + ',';&lt;BR /&gt; uat_software_string_display += gr.u_service.getDisplayValue() + ',';&lt;BR /&gt;}&lt;BR /&gt; &lt;BR /&gt; uat_software_array = uat_software_string.split(',');&lt;BR /&gt; uat_software_array.length --;&lt;/P&gt;
&lt;P&gt;uat_software_array_display = uat_software_string_display.split(',');&lt;BR /&gt; uat_software_array_display.length --;&lt;BR /&gt; gs.addInfoMessage("Current Software - " + uat_software_array_display.toString());&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;output for current software is nothing, when running it from employee history application, when I run it on global I get the output of one application (which is all it should have) of Slack.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 22:16:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079895#M736821</guid>
      <dc:creator>kazidon</dc:creator>
      <dc:date>2018-07-10T22:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: cannot access table from a scoped application</title>
      <link>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079896#M736822</link>
      <description>&lt;P&gt;here is the whole script if you need that&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var user = '581949a4136f4b80ce8b7d576144b08d';&lt;BR /&gt;var arrayUtil = new global.ArrayUtil();&lt;/P&gt;
&lt;P&gt;var uat_software_array = [];&lt;BR /&gt;var uat_software_array_display = [];&lt;BR /&gt;var new_job_title_software_array = [];&lt;BR /&gt;var new_job_title_software_array_display = [];&lt;BR /&gt;var add_add_gen_access_array = [];&lt;BR /&gt;var remove_add_gen_access_array = [];&lt;BR /&gt;var add_add_gen_access_array_display = [];&lt;BR /&gt;var remove_add_gen_access_array_display = [];&lt;/P&gt;
&lt;P&gt;var new_job_title_software_string = "";&lt;BR /&gt;var uat_software_string = "";&lt;BR /&gt;var uat_software_string_display = "";&lt;BR /&gt;var new_job_title_software_string_display = "";&lt;/P&gt;
&lt;P&gt;var counter = 0;&lt;/P&gt;
&lt;P&gt;function QueryUAT()&lt;BR /&gt;{&lt;BR /&gt;var gr = new GlideRecord('u_user_access_list');&lt;BR /&gt;gr.addQuery('u_user', 'bdb4e9601341b2006bda75c36144b062');&lt;BR /&gt;gr.addQuery('active', true);&lt;BR /&gt;gr.query();&lt;BR /&gt;while(gr.next())&lt;BR /&gt;{&lt;BR /&gt; uat_software_string += gr.u_service + ',';&lt;BR /&gt; uat_software_string_display += gr.u_service.getDisplayValue() + ',';&lt;BR /&gt;}&lt;BR /&gt; &lt;BR /&gt; uat_software_array = uat_software_string.split(',');&lt;BR /&gt; uat_software_array.length --;&lt;/P&gt;
&lt;P&gt;uat_software_array_display = uat_software_string_display.split(',');&lt;BR /&gt; uat_software_array_display.length --;&lt;BR /&gt; gs.addInfoMessage("Current Software - " + uat_software_array_display.toString());&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;function QueryNewJobTitle()&lt;BR /&gt;{&lt;BR /&gt; var gr = new GlideRecord('x_prole_emp_onb_employee_onboarding');&lt;BR /&gt; gr.addQuery('u_job_title', 'e9885e5113268bc08242335fd144b0f7');&lt;BR /&gt; gr.addQuery('u_list_location', 'Draper Headquarters');&lt;BR /&gt; gr.query();&lt;BR /&gt; while(gr.next())&lt;BR /&gt; {&lt;BR /&gt; new_job_title_software_string += gr.u_add_gen_access + ',';&lt;BR /&gt; new_job_title_software_string_display += gr.u_add_gen_access.getDisplayValue() + ',';&lt;BR /&gt; }&lt;BR /&gt; new_job_title_software_array = new_job_title_software_string.split(',');&lt;BR /&gt; new_job_title_software_array.length --;&lt;/P&gt;
&lt;P&gt;new_job_title_software_array_display = new_job_title_software_string_display.split(',');&lt;BR /&gt; new_job_title_software_array_display.length --;&lt;BR /&gt; gs.addInfoMessage("New Software - " + new_job_title_software_array_display.toString());&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;function ArrayDiff()&lt;BR /&gt;{&lt;BR /&gt; add_add_gen_access_array = arrayUtil.diff(new_job_title_software_array, uat_software_array); &lt;BR /&gt; add_add_gen_access_array_display = arrayUtil.diff(new_job_title_software_array_display, uat_software_array_display);&lt;/P&gt;
&lt;P&gt;remove_add_gen_access_array = arrayUtil.diff(uat_software_array, new_job_title_software_array);&lt;BR /&gt; remove_add_gen_access_array_display = arrayUtil.diff(uat_software_array_display, new_job_title_software_array_display);&lt;BR /&gt; gs.addInfoMessage("Add This - " + add_add_gen_access_array_display.toString());&lt;BR /&gt; gs.addInfoMessage("Remove This - " + remove_add_gen_access_array_display.toString());&lt;BR /&gt; gs.addInfoMessage('Remove Length - ' + remove_add_gen_access_array.length);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;QueryUAT();&lt;BR /&gt;QueryNewJobTitle();&lt;BR /&gt;ArrayDiff();&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 22:17:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079896#M736822</guid>
      <dc:creator>kazidon</dc:creator>
      <dc:date>2018-07-10T22:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: cannot access table from a scoped application</title>
      <link>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079897#M736823</link>
      <description>&lt;P&gt;To confirm whether you are able to access the custom global table via the scoped app or not. You can follow the below steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Navigate to background-scripts and execute the below script.&lt;/P&gt;
&lt;P&gt;var gr = new GlideRecord('u_user_access_list');&lt;BR /&gt;gr.addQuery('u_user', 'bdb4e9601341b2006bda75c36144b062');&lt;BR /&gt;gr.addQuery('active', true);&lt;BR /&gt;gr.query();&lt;BR /&gt;while(gr.next())&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;gs.info(gr.getRowCount());&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Make sure to select the correct scope before triggering this script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Pradeep Sharma&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 22:21:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079897#M736823</guid>
      <dc:creator>Pradeep Sharma</dc:creator>
      <dc:date>2018-07-10T22:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: cannot access table from a scoped application</title>
      <link>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079898#M736824</link>
      <description>&lt;P&gt;thanks for pointing me in the right direction, it wasn't working because 'active' should have been 'u_active'. F!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 22:29:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079898#M736824</guid>
      <dc:creator>kazidon</dc:creator>
      <dc:date>2018-07-10T22:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: cannot access table from a scoped application</title>
      <link>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079899#M736825</link>
      <description>&lt;P&gt;You are very welcome Kazidon. I'm glad your issue is resolved now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for participating in the community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Pradeep Sharma&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 23:05:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/cannot-access-table-from-a-scoped-application/m-p/2079899#M736825</guid>
      <dc:creator>Pradeep Sharma</dc:creator>
      <dc:date>2018-07-10T23:05:18Z</dc:date>
    </item>
  </channel>
</rss>

