- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2024 08:57 PM
I need to make my store app add an entry to sys_service upon installation. How can I achieve it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2024 09:02 PM
Hi @ratnaj
You need to add a script in "Scripted Application Install Exit" for your application,
(function install() {
var gr = new GlideRecord('sys_service');
gr.initialize();
gr.name = 'Your Service Name';
gr.description = 'Your Service Description';
gr.insert();
})();
After this don't forget to publish.
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2024 09:01 PM
@ratnaj , do you want to publish your app into ServiceNow store??
if not can you elaborate your ask
Regards,
Shyamkumar
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2024 09:02 PM
Hi @ratnaj
You need to add a script in "Scripted Application Install Exit" for your application,
(function install() {
var gr = new GlideRecord('sys_service');
gr.initialize();
gr.name = 'Your Service Name';
gr.description = 'Your Service Description';
gr.insert();
})();
After this don't forget to publish.
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2024 10:37 PM
Thanks Shaqeel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 01:11 AM
Hi @ratnaj
Kindly mark Helpful 🙂
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel