Can we use Scripted API to create a Database view

kalaiarasan
Tera Contributor

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? 

2 REPLIES 2

Kristen Ankeny
Kilo Sage

What business problem are you trying to solve with this solution? You wouldn't normally do something like this. 

Community Alums
Not applicable

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