- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 02:31 PM
I am creating a catalog item and workflow that allows to create CI . The form has selection for class and name. How do I create using GlideRecord?
Do I need to define new GlideRecord("cmdb_ci_' + className");
or
gr = new GlideRecord('cmdb_ci");
gr.class = variables.className
Appreciate input
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 09:13 PM
Please use the child table using your first syntax.
I hope className variable will have the right class name set to it.
For example if you want to insert a record in Windows then your className should be win_server by that with way it point to cmdb_ci_win_server table using the syntax below.
new GlideRecord("cmdb_ci_' + className");
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 09:13 PM
Please use the child table using your first syntax.
I hope className variable will have the right class name set to it.
For example if you want to insert a record in Windows then your className should be win_server by that with way it point to cmdb_ci_win_server table using the syntax below.
new GlideRecord("cmdb_ci_' + className");
Thanks & Regards,
Vasanth