Access a global table from a scoped application in an Event.

robert_jrp
Giga Contributor

Hello developers community.

To give you some context: We have a solution that involves a number of customizations on the native Service Catalog Requests process, and we were doing those customizations in the global scope. However, in order to be able to deploy our solution to the ServiceNow Store, we found out that we had to create a scoped application. The customizations involve events, script includes, business rules, script actions, outbound REST messages, among others. We do not use any custom tables or forms. We are able to create everything inside the scope of the new application, but the events, since these events have to happen when there are changes on a global table (sc_request). So, we are forced to create the event as global, however, how can we deploy our entire solution as an application, if the events will not be included? Is there a way to include it? What's the best practice in this case?

Thanks for your support.

Regards.

11 REPLIES 11

Rajesh Mushke
Mega Sage
Mega Sage

Hi Roberto,



make sure Access from should be : all application scopes


and must check the Allow configuration Check box to do configuration in scope



please find the Example below :



Granting Access to Configuration Records

You can permit other application scopes to create configuration records on application data tables. You can grant access to the following configuration records with these settings.


Configuration recordSettings required to grant access
Access controls
  • Accessible from is set to All application scopes
  • Can read is selected
Business rules
Client scripts
  • Accessible from is set to All application scopes
  • Can read is selected
  • Allow configuration is selected
Dictionary entry (new field only)
UI actions


Granting other application scopes design access permission




Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

Rajesh, thanks for your very helpful reply.



However, am I right to say that this particular change in the native table configuration will also require an update set? If so, it will not be included in the scoped application deployment, am I right?



EDIT: I checked the Allow Configuration checkbox and tried creating an event. However, the table drop down is still empty.



Regards.


Hello Roberto,



1. if you changed in global scope, you have to maintain global update set and this changes will be captured and those changes are included in scoped application deployment.



2. do the same changes for   event table then only you're able to select.




Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

Rajesh,



Thanks again for your reply.



1. So far I haven't noticed that the changes you perform in the global scope are also applied in the application update set, however I will surely test this right now and give you the feedback. If this works, that would be great. Thanks!



2. I think I did not explain myself correctly about this. What I did was go to System Definitions - Tables and search for the table sc_request. Then, I applied the following settings:



sc_request.PNG



Then, I went to Performance Analytics - Event Registry and created a new event (inside the scope of my application). I expect to see the table sc_request, however, the dropdown is empty:



event.PNG



If #1 works, I probably won't need to perform #2.



Thanks and regards.