The CreatorCon Call for Content is officially open! Get started here.

Import data in scoped application at time of install?

akaupisch
Kilo Guru

I have a custom table in a scoped application. That table is essentially a choice table but is meant for users to add/remove from. I have a default 10 records that I want to have installed with it when the application is installed.

Is there an easy / best practice way of doing this?

I could create a fix script which would do an insert for each one, but that seems kinda lame especially if I had a table with 100 items in it.

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee
5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Chuck Tomasi
Tera Patron

Hi Adam,



I do this all the time. It's pretty straight forward. Select the records from the list and use the list UI action "Create Application File". A dialog box comes up and you're good to go.



find_real_file.png


If I ever need to remove/update them, how do I access them? Do I simply go into applications settings and remove them from the related Application Files list or is there a better way?


Navigate to sys_metadata.list and group by your application and then group by class and search for records with class type metadata snapshot and delete the records.


Screen Shot 2017-06-01 at 3.06.01 PM.png