Can we use Scripted API to create a Database view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2024 01:33 AM
I was trying to create a Database view with two columns using the Scripted API. The tables i used to create where invalid. So is there any document having the procedure to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2024 04:00 PM
What business problem are you trying to solve with this solution? You wouldn't normally do something like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2024 05:27 PM
Hi @kalaiarasan ,
It's uncommon for someone to use the Scripted API in ServiceNow to generate a database view; normally such views are generated through the Database Views module in the ServiceNow user interface. If you want a view on this subject without manual intervention, then insert a record into two tables - sys_db_view and sys_db_view_table.
Note- This is not the traditional way of creating database view and would recommend to follow ServiceNow best practices.
If my response has resolved your query, please consider giving it a thumbs up and marking it as the correct answer!
Thanks & Regards,
Sanjay Kumar