Ui Action

p_dimitrov
Tera Contributor

Hi, i don't know how to deal with that:

Create a UI Action ‘Add Bulk Relationships’. It should be available on the List of the ‘cmdb_ci’ table.

We want the following functionality: A user selects(marks) several CIs from the list and clicks on the button. A pop-up appears containing two reference fields : Parent(reference to ‘cmdb_ci’) and Relationship Type(reference to ‘cmdb_rel_type’). The user selects Parent and Relationship Type and clicks on ‘OK’. After that, the system creates the Relationships in the ‘cmdb_rel_ci’ table.

Here are some screenshots for guidance:

Untitled.jpg

2 REPLIES 2

p_dimitrov
Tera Contributor

Untitled.png

Untitled.jpg

Wybren1
Tera Guru

There is a option: g_list.getChecked(); to get the selected ID's back, with this and the selected relation/parent you should be able to create the records for each selected CI.

https://developer.servicenow.com/dev.do#!/reference/api/tokyo/client/c_GlideListV3API#r_GLV3-getChec...

Hope that helps!