How to Configure CI Class in the Model category for Handheld devices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 10:22 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 10:23 PM
Why don't you use the OOB CI class cmdb_ci_handheld_computing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2022 02:03 AM
Hi Manasa,
When I try to change the CI Class with a background script, I get the following error:
"Changing the CI class after creation is not allowed"
This action is blocked by the business rule "Protect cmdb_ci_class".
You can try this, but test it good on a test environment!!
1. Disable the Business Rule "Protect cmdb_ci_class".
2. Run the script below in the "Scripts - Background"
3. Enable the Business Rule "Protect cmdb_ci_class"
Script
Change the name "Handheld Computing" to the name that you are using for the Model Category you want to change.
var gr = new GlideRecord("cmdb_model_category");
gr.addQuery("name", "Handheld Computing");
gr.query();
while (gr.next()) {
gr.cmdb_ci_class = "cmdb_ci_handheld_computing";
gr.update();
}
Regards,
Michael
Michael
Please mark the suggestion as helpful/like, if you find it useful to you or others who wants to refer similar content.
Please mark the solution as correct, if the answer provided has resolved your query.